Hi Paul,
I tried out the legend proxy artist, and it works for rectangles in the
legend, but I can't seem to get a Circle to appear in the legend, which I
presume should be:
p = Circle((0, 0), fc=r)
legend([p], [Red Rectangle])
On Wed, Apr 9, 2014 at 2:20 PM, Adam Hughes hughesada...@gmail.com
Adam,
I agree that the Circle ended up with a rectangle in the legend, which I
wouldn't think of as the expected response. Would the following work for your
purposes?
figure()
p,=plot(0,0,marker='o',ls='',color='red')
legend([p], [Red Rectangle],numpoints=1)
p.remove()
draw()
-Sterling
On
Hey Adam,
I wouldn't make a circle, instead use a Line2D artist (accessible from
pyplot) with they same (base) symbology as your scatter plot. It has pretty
much the same call signature as ax.plot
-paul
On Fri, Apr 11, 2014 at 9:35 AM, Sterling Smith smit...@fusion.gat.comwrote:
Adam,
I
Thanks. That's probably the way I'll go. At first, I thought creating
separate legend markers and removing them from the plot seemed hacky, but I
guess there's no way that matplotlib could know which legend size I want.
I wonder if there'd be any interest in a PR to add a keyword to legend to
On Wed, Apr 9, 2014 at 9:00 AM, Adam Hughes hughesada...@gmail.com wrote:
Thanks. That's probably the way I'll go. At first, I thought creating
separate legend markers and removing them from the plot seemed hacky, but I
guess there's no way that matplotlib could know which legend size I
Thanks Paul, I will try it out.
On Wed, Apr 9, 2014 at 12:21 PM, Paul Hobson pmhob...@gmail.com wrote:
On Wed, Apr 9, 2014 at 9:00 AM, Adam Hughes hughesada...@gmail.comwrote:
Thanks. That's probably the way I'll go. At first, I thought creating
separate legend markers and removing
Hello,
I've been searching but can't seem to find this topic addressed (perhaps
wrong search terms)
Simply put, I have a scatter plot with variable size markers, and I'd like
to have the markers all be a single size in the legend. Is there a
standard way to do this?
Thanks.
Adam,
I haven't investigated, but does the discussion of the legend marker at [1]
help?
-Sterling
[1]
https://www.mail-archive.com/matplotlib-users@lists.sourceforge.net/msg25200.html
On Apr 8, 2014, at 3:44PM, Adam Hughes wrote:
Hello,
I've been searching but can't seem to find this