When using unitized data any call to 'set_xlim' or 'set_ylim' will reset any 
user specified labels or tickers for a given axis and
replace it with the values specified via the unitized data 'axisinfo'

See the following for an example:

###########################################
from basic_units import cm, inch
from pylab import figure, show
import numpy

cms = cm *numpy.arange(0, 10, 2)

fig = figure()

ax1 = fig.add_subplot(2,2,1)
ax1.plot(cms, cms)

ax2 = fig.add_subplot(2,2,2)
ax2.plot(cms, cms, xunits=cm, yunits=inch)

ax3 = fig.add_subplot(2,2,3)
ax3.plot(cms, cms, xunits=inch, yunits=cm)
ax3.set_xlabel( "My Label" )
ax3.set_xlim(3, 6)  # scalars are interpreted in current units

# Since we call set_xlim with unitized data, the label will be reset.
ax4 = fig.add_subplot(2,2,4)
ax4.plot(cms, cms, xunits=inch, yunits=inch)
ax4.set_xlabel( "My Label" )
ax4.set_xlim(3*cm, 6*cm) # cm are converted to inches

show()
###########################################

--James Evans



-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to