From: Gökhan S. <gok...@gm...> - 2009-08-06 16:54:12
|
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? 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? Thanks. On Thu, Aug 6, 2009 at 11:47 AM, Jae-Joon Lee <lee...@gm...> 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<gok...@gm...> 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 > > Mat...@li... > > https://lists.sourceforge.net/lists/listinfo/matplotlib-users > > > > > -- Gökhan |