John Hunter wrote: > On Thu, Jun 12, 2008 at 8:56 PM, T J <[EMAIL PROTECTED]> wrote: >> I am making a scatter plot and want the legend to display the symbols. >> This functionality doesn't seem to exist, so I have followed the >> workaround outlined here: >> >> http://www.nabble.com/Legend-for-a-scatter-plot-based-on-symbols-td17554839.html#a17554839 >> >> Are there any plans to make the symbols which are available in plot() >> the same as those available for scatter()? If not, can we at least >> get the diamond symbol the same? I want to pass the same symbol to >> plot() and scatter() and get the same symbol---as it is, I must use >> 'd' in scatter and 'D' in plot. > > I think this is worth fixing -- could you file a bug on the > sourceforge site and note any symbols you are aware of that don't > agree between plot and scatter.
Hi John, this is something that came up some time ago already. http://www.nabble.com/forum/ViewPost.jtp?post=16054211&framed=y Paul Novak had planed to work on scatter legend and I am also interested in this, so we came up with a code fragment, but it doesn't do the job well. I think a legend for scatter is something that is really needed for matplotlib. The main problem is, that I got lost in all those transform things - finally I felt like crazy ;-) >> Also, how are the markersizes scaled? For example, in scatter(), I am >> using s=30...but if I do plot(...,markersize=30), then the markers are >> not the same size as the markers from the scatter plot. I can go back >> and forth until the scale is right, but is there a better way? > > Note sure if this is a bug or a feature, but it is a consequence of > emulating the matlab approach. In scatter, the size often is used to > convey information, and the size parameter give thes area of the > circle that circumscribes the marker. In plot, he marker size is not > generally intended to convey information, only that something happened > here, and the size choice is usually one of aesthetics. In any case, > in plot the size is radius of the circle, the side of the square or > diamond. For most markers, you should be able to square the > markersize to get approximate correspondence between plot and scatter. I think that's something that is also a bit "unfortunate" in matplotlib. Basically, there are two different routines to draw markers: one is plot(), and on is scatter(). Both do nearly the same thing, but use different code bases. It might be worth to think about reorganizing this ??? Having one function that creates markers, and incorporating them from both, scatter() and plot(), sounds like a good idea to me !? Manuel ------------------------------------------------------------------------- Check out the new SourceForge.net Marketplace. It's the best place to buy or sell services for just about anything Open Source. http://sourceforge.net/services/buy/index.php _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel