Hi,
In looking over a test failure, I'm seeing some behavior that doesn't make
sense to me. It looks like data passed to a line object is being improperly
converted when units are involved. Here's a version of the code in the test
script, but modified to use the units in basic_units.py (in the
examples/units directory). You should be able to just drop this script into
the examples/units directory and run it:
from basic_units import secs, minutes, cm
import matplotlib.pyplot as plt
xdata = [ x*secs for x in range(10) ]
ydata1 = [ (1.5*y - 0.5)*cm for y in range(10) ]
ydata2 = [ (1.75*y - 1.0)*cm for y in range(10) ]
fig = plt.figure()
ax = plt.subplot( 111 )
l1, = ax.plot( xdata, ydata1, color='blue', xunits=secs )
l2, = ax.plot( xdata, ydata2, color='green', xunits=minutes )
print l1._xorig
print l2._xorig
print ax.lines
plt.show()
Based on the original test, it seems like this behavior should work (just
rescale the x-axis without actually changing the plot). Am I missing
something, or is this a real bug?
Ryan
--
Ryan May
Graduate Research Assistant
School of Meteorology
University of Oklahoma
Sent from Norman, Oklahoma, United States
------------------------------------------------------------------------------
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