SourceForge logo
SourceForge logo
Menu

matplotlib-users

From: Nils W. <nw...@ia...> - 2008年08月28日 17:14:54
Attachments: curve_fit.py
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
From: John H. <jd...@gm...> - 2008年08月28日 18:29:11
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
From: Nils W. <nw...@ia...> - 2008年08月28日 18:35:04
Attachments: test.png
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
From: John H. <jd...@gm...> - 2008年08月28日 18:44:49
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
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.
Thanks for helping keep SourceForge clean.
X





Briefly describe the problem (required):
Upload screenshot of ad (required):
Select a file, or drag & drop file here.
Screenshot instructions:

Click URL instructions:
Right-click on the ad, choose "Copy Link", then paste here →
(This may not be possible with some types of ads)

More information about our ad policies

Ad destination/click URL:

AltStyle によって変換されたページ (->オリジナル) /