When plotting with legends using PyPlot, I got the following error. What may this error be caused by?
/usr/lib/pymodules/python2.7/matplotlib/legend.py:613: UserWarning: Legend does not support [<matplotlib.lines.Line2D object at 0x7fb319819150>]
Use proxy artist instead.
http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist
(str(orig_handle),))
Steven, Thanks for reminding me that! Well, the example I gave is just a simplified version my actual code. In the actual code I have a dozen of calls of plots and only some of them are referred in the legend. So I need only some of the handles, not all of them. Thanks!!
I’m trying to plot two lines by calling plot only once. But both of the legends are set to be the legend for the second line. Am I missing anything? Thanks!!
On the one hand, I want to include the julia code into my paper and the space I have is rather limited. The fewer lines, the better. On the other hand, I’m expecting what I have above to work normally. Since what I see is not what I expect, I thought I’d better ask. There might be some ideas of pyplot that I don’t know. I know this is somewhat a silly question. But my curiosity drove me to ask… Sorry…
It’s a fair question, I have just personally never liked that compressed style, but if space is at a premium then it makes sense. I’m afraid I don’t know the answer, though!