Simson Garfinkel wrote: > In working on code for matplotlib, I would generally find it easier to > provide an array of objects than to provide an array of X values and a > second array of Y values. I understand that X[] and Y[] is the way > that matlab does it, but we would find it easier to provide an array > of either tuples [(x1,y1), (x2,y2), ...] or else an array of objects > with .x and .y properties. > > Other than doing our own cover, is there any other way to do this? Any > thoughts of adding this functionality?
Internally, we often do end up using Nx2 ndarrays. I don't think it makes sense to complicate the API by directly supporting other function signatures, however, if this is what you are proposing. For example, we have plot(y) and plot(x,y); to support either of the alternatives you mention above would require either a kwarg or a different function name. Personally, I would rather leave it to the user to take care of this as needed, and keep the additional complexity out of matplotlib. Eric > > -Simson > ------------------------------------------------------------------------------ Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise -Strategies to boost innovation and cut costs with open source participation -Receive a $600 discount off the registration fee with the source code: SFAD http://p.sf.net/sfu/XcvMzF8H _______________________________________________ Matplotlib-users mailing list Matplotlib-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-users