Ubuntu下的Matplotlib图例错误(但不在Windows Vista上)

时间:2013-02-11 15:53:43

标签: python python-2.7 matplotlib ubuntu-12.04

我有一个使用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'成为意外的关键字参数。有人可以帮忙吗?

由于

0 个答案:

没有答案