On Thu, Aug 6, 2009 at 12:54 PM, Gökhan Sever<gokhanse...@gmail.com> wrote:
> Thanks JJ,
>
> I was playing with different ways to create legends, and found myself a way
> just like you suggested.
>
> I guess in legend as long as a sequence is provided it doesn't matter
> whether it is a tuple or list. Am I correct?
>

As far as it is iterable, it should be okay.

> Additionally, speaking of scatters; is there a way to add a colorbar next to
> scatters depicting the variation in colors or size of the scatters?
>

I'm not sure what exactly you're trying to do here.

You mean something like this?

http://matplotlib.sourceforge.net/examples/pylab_examples/ellipse_collection.html

The example uses EllipseCollection but scatter basically creates collections.

If there is any screenshot you can show (may be from other plotting
tool), it would be much easier to figure out.

-JJ

-ps. By the way, I'm afraid that this fix missed the 0.99 release.


> Thanks.
>
> On Thu, Aug 6, 2009 at 11:47 AM, Jae-Joon Lee <lee.j.j...@gmail.com> wrote:
>>
>> This turned out to be a bug introduced recently, which is now fixed in
>> the 0.99 maintenance branch.
>> The fix is not merged into the head yet. I tried svnmerge.py but it
>> gave some merge conflict. While the conflict seems rather trivial,
>> I'll leave it to others.
>>
>> Meanwhile, you can explicitly give artists and labels to create the
>> legend.
>>
>> s1 = scatter(..)
>> s2 = scatter(..)
>>
>> legend([s1, s2], ["aaaa", "cccc"])
>>
>> -JJ
>>
>>
>> On Tue, Aug 4, 2009 at 4:51 PM, Gökhan Sever<gokhanse...@gmail.com> wrote:
>> > Hello,
>> >
>> > Could not get a legend shown on scatter function used plot:
>> >
>> > In [4]: a = rand(100)
>> >
>> > In [5]: b = rand(100)
>> >
>> > In [22]: scatter(a,b, c=a, s=b, label="aaaa")
>> > Out[22]: <matplotlib.collections.CircleCollection object at 0xa133dcc>
>> >
>> > In [23]: scatter(a,b, c=a*5, s=b*5, label="cccc")
>> > Out[23]: <matplotlib.collections.CircleCollection object at 0xa311e6c>
>> >
>> > In [24]: legend()
>> >
>> > at rev 7355.
>> >
>> > with
>> >
>> > Python 2.6 (r26:66714, Jun  8 2009)
>> > IPython 0.10.bzr.r1163 -- An enhanced Interactive Python.
>> >
>> > Any suggestions?
>> >
>> >
>> > --
>> > Gökhan
>> >
>> >
>> > ------------------------------------------------------------------------------
>> > Let Crystal Reports handle the reporting - Free Crystal Reports 2008
>> > 30-Day
>> > trial. Simplify your report design, integration and deployment - and
>> > focus
>> > on
>> > what you do best, core application coding. Discover what's new with
>> > Crystal Reports now.  http://p.sf.net/sfu/bobj-july
>> > _______________________________________________
>> > Matplotlib-users mailing list
>> > Matplotlib-users@lists.sourceforge.net
>> > https://lists.sourceforge.net/lists/listinfo/matplotlib-users
>> >
>> >
>
>
>
> --
> Gökhan
>

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users

Reply via email to