I guess this is a known bug and already fixed. Maybe ubuntu 9.4 sheeps with the older version though (the bug was fixed in this January, so, I'm not sure).
http://www.nabble.com/unable-to-create-legend-for-vlines-graph-td21707558.html#a21707558 You may try to install the latest version. Or you may use the option 4 as a work around. http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist Regards, -JJ On Fri, Oct 16, 2009 at 9:34 PM, Michael Waters <mjwat...@umich.edu> wrote: > When I try to make a legend after using the vlines command, I get a > _legmarker error. > > my code: > > > plot(two_theta,y_value_list_1) > vlines(two_theta,[0],y_value_list_2,linewidth = 2) > legend(['1','2']) > > > the error: > > Exception in Tkinter callback > Traceback (most recent call last): > File "/usr/lib/python2.6/lib-tk/Tkinter.py", line 1413, in __call__ > return self.func(*args) > File > "/usr/lib/python2.6/dist-packages/matplotlib/backends/backend_tkagg.py", > line 212, in resize > self.show() > File > "/usr/lib/python2.6/dist-packages/matplotlib/backends/backend_tkagg.py", > line 215, in draw > FigureCanvasAgg.draw(self) > File > "/usr/lib/python2.6/dist-packages/matplotlib/backends/backend_agg.py", line > 279, in draw > self.figure.draw(self.renderer) > File "/usr/lib/python2.6/dist-packages/matplotlib/figure.py", line 772, in > draw > for a in self.axes: a.draw(renderer) > File "/usr/lib/python2.6/dist-packages/matplotlib/axes.py", line 1601, in > draw > a.draw(renderer) > File "/usr/lib/python2.6/dist-packages/matplotlib/legend.py", line 316, in > draw > self._update_legend_box(renderer) > File "/usr/lib/python2.6/dist-packages/matplotlib/legend.py", line 626, in > _update_legend_box > legline_marker = legline._legmarker > AttributeError: 'Line2D' object has no attribute '_legmarker' > > > This stopped working after I installed ubuntu 9.4 > > thanks, > -mike w. > > > ------------------------------------------------------------------------------ > Come build with us! The BlackBerry(R) Developer Conference in SF, CA > is the only developer event you need to attend this year. Jumpstart your > developing skills, take BlackBerry mobile applications to market and stay > ahead of the curve. Join us from November 9 - 12, 2009. Register now! > http://p.sf.net/sfu/devconference > _______________________________________________ > Matplotlib-users mailing list > Matplotlib-users@lists.sourceforge.net > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users