1

我有一个使用 matplotlib 的 python 程序,它在 windows vista 下运行良好,但在 Ubuntu 下我收到以下错误:

Traceback (most recent call last):
  File "Main.py", line 175, in my_measure
    self.widget.canvas.ax.legend(loc = 'center left', bbox_to_anchor = (2.2, 0.5), ncol = 1, fontsize = 10) # defining the legend properties, such as positioning and labels fontsize
  File "/usr/lib/pymodules/python2.7/matplotlib/axes.py", line 4519, in legend
    self.legend_ = mlegend.Legend(self, handles, labels, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'fontsize'

我不明白为什么 'fontsize' 变成了一个意想不到的关键字参数。有人可以帮忙吗?

谢谢

4

0 回答 0