|
From: Jae-Joon L. <lee...@gm...> - 2011-01-06 14:20:46
|
On Thu, Jan 6, 2011 at 1:24 PM, Benjamin Root <ben...@ou...> wrote: > I apologize for how long it has taken to get back to you. I can confirm > your bug, and it is indeed a bug. However, I am not sure how exactly it > should be dealt with. To prevent it from getting lost, could you please > file a report on our bug tracker? I think this should be more like a feature request (rather than a bug). Legend only support simple artists such as lines/patches/collections. This is mentioned in the documentation (http://matplotlib.sourceforge.net/api/pyplot_api.html#matplotlib.pyplot.legend) but may be not explicit enough. Implementing legend for stem command is not very straight forward as command like stem create multiple artists. I prefer commands like stem to return a single container artist, but this has potential to break the old code. For the original question, you may use proxy artist (http://matplotlib.sourceforge.net/users/legend_guide.html#using-proxy-artist). However, I'm afraid none of the currently supported artists is close to what you want. And it is not easy (for a normal user) to create a customized legend unfortunately. Regards, -JJ |