On Wed, May 20, 2009 at 2:36 PM, Eric Firing <efir...@hawaii.edu> wrote:

> I'm not sure I understand the use case for unit *changes*, as opposed to
> initial unit specification.

The use case (and we can debate whether this is worth the extra overhead)

  ax.plot(inches)
  ax.set_xlim(cms)

And the plot will automagically update with the new units.  This
worked in the original implementation, but due to some code rot has
breakage somewhere.  This was a feature requested by the JPL when I
did the original implementation.

Alternatively if you did

  ax.plot(inches)

and later

  ax.plot(cms)

the first line would be updated to cm and both would be plotted in cm.
 But if you did

  ax.plot(seconds)

you would get an error since the inches and cms lines would not be
able to convert.

In the scheme I proposed (plot items with updates on unit change), if
you had a line object contained in a PlotItem class, and the original
units were in inches, the line's xdata would be simple float array in
inches.  If you changed the axis units to cm, the line's xdata  would
automatically be updated to floats but now in cm.

JDH

------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables 
unlimited royalty-free distribution of the report engine 
for externally facing server and web deployment. 
http://p.sf.net/sfu/businessobjects
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to