On Tue, Aug 16, 2011 at 7:12 PM, Andre' Walker-Loud walksl...@gmail.comwrote:
Hi All,
A question for a possible new feature for Matplotlib.
First, in case there is a way to do it currently:
I often find myself plotting data with errorbars, and I would like to be
able to modify the marker, or marker size of each individual point
separately. A (seemingly to me) natural way to do this would allow
marker
markersize
markerfacecolor
markeredgecolor
etc accept arrays, as well as a single kwarg. As far as I can tell, if I
have a set of data, and I want to make the markers with different sizes, the
only way to do this is have a loop that calls each data point individually
and assigns the marker features.
That's how I would do it right now.
1 - am I mistaken? and if so, could someone instruct me how to achieve my
goal
2 - does anyone else find this feature desirable? If so, could this be
added to Matplotlib? I have not the coding experience to attempt this
myself - but I imagine the simplest thing to do would be check if the
marker, ms, etc are given single kwargs, or arrays. If single, everything
happens as now. If array, then check the len of the array against the len
of the data, and if the same, match the entries.
I personally would love to see more consistent support for features like
this across all plotting and collection types. However, there are some
issues that prevent making this an easy fix. The primary issue is
distinguishing user intent with respect to colors. Right now, a user could
specify color as a string or a rgb tuple. Now, if we accept an array of
those things, it becomes harder to determine the user's intent.
The way forward, I think, is some sort of decorator library (dbook.py?) that
provides a common set of methods that all plotting and collection functions
could use to consistently prepare input data.
I encourage you to file a feature request on github, but for now, the best
way seems to be looping the errorbar call.
Cheers,
Ben Root
--
Get a FREE DOWNLOAD! and learn more about uberSVN rich system,
user administration capabilities and model configuration. Take
the hassle out of deploying and managing Subversion and the
tools developers use with it. http://p.sf.net/sfu/wandisco-d2d-2___
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users