Hi all, I am wondering if I can use scatter in connection with legend (attached test for details). I am using the latest svn version. Any pointer would be appreciated. Cheers, Nils
On Thu, Aug 28, 2008 at 12:14 PM, Nils Wagner <nw...@ia...> wrote: > Hi all, > > I am wondering if I can use scatter in connection with legend > (attached test for details). I am using the latest svn version. Your example works for me -- we recently added support for autolegending of scatters using a proxy rectangle of the same color as the first symbol in the scatter. This could be improved upon by using a proxy patch with the same shape as your first polygon in the collection, but there are some scaling issues that have to be worked out. Is it the fact that you get a Rectangle vs a Circle that you are posting about? Or are you not getting anything at all for your scatter in the legend? JDH
On 2008年8月28日 13:29:07 -0500 "John Hunter" <jd...@gm...> wrote: > On Thu, Aug 28, 2008 at 12:14 PM, Nils Wagner > <nw...@ia...> wrote: >> Hi all, >> >> I am wondering if I can use scatter in connection with >>legend >> (attached test for details). I am using the latest svn >>version. > > Your example works for me -- we recently added support >for > autolegending of scatters using a proxy rectangle of the >same color as > the first symbol in the scatter. This could be improved >upon by using > a proxy patch with the same shape as your first polygon >in the > collection, but there are some scaling issues that have >to be worked > out. > > Is it the fact that you get a Rectangle vs a Circle that >you are > posting about? Or are you not getting anything at all >for your > scatter in the legend? > > JDH Please find attached the output (test.png). The order of the legend entries is wrong. Am I missing something ? Nils
On Thu, Aug 28, 2008 at 1:34 PM, Nils Wagner <nw...@ia...> wrote: > Please find attached the output (test.png). > The order of the legend entries is wrong. Am I missing > something ? OK, now I see your point. auto-legending doesn't respect the order of the plots across different artist types. I hadn't thought of this before. As a workaround, you can use the label kwarg: scatter(x,y,label='Messdaten') plot(xr,yr,label='Ausgleichskurve') legend(shadow=True) JDH