Revision: 6774
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6774&view=rev
Author: jdh2358
Date: 2009-01-10 20:44:07 +0000 (Sat, 10 Jan 2009)
Log Message:
-----------
fixed unit and autoscaling behavior of the ax line/span funcs
Modified Paths:
--------------
branches/v0_98_5_maint/lib/matplotlib/axes.py
Modified: branches/v0_98_5_maint/lib/matplotlib/axes.py
===================================================================
--- branches/v0_98_5_maint/lib/matplotlib/axes.py 2009-01-10 20:34:28 UTC
(rev 6773)
+++ branches/v0_98_5_maint/lib/matplotlib/axes.py 2009-01-10 20:44:07 UTC
(rev 6774)
@@ -2802,6 +2802,7 @@
# We need to strip away the units for comparison with
# non-unitized bounds
+ self._process_unit_info( ydata=y, kwargs=kwargs )
yy = self.convert_yunits( y )
scaley = (yy<ymin) or (yy>ymax)
@@ -2861,6 +2862,7 @@
# We need to strip away the units for comparison with
# non-unitized bounds
+ self._process_unit_info( xdata=x, kwargs=kwargs )
xx = self.convert_xunits( x )
scalex = (xx<xmin) or (xx>xmax)
@@ -2927,6 +2929,7 @@
p.set_transform(trans)
p.x_isdata = False
self.add_patch(p)
+ self.autoscale_view(scalex=False)
return p
axhspan.__doc__ = cbook.dedent(axhspan.__doc__) % martist.kwdocd
@@ -2982,6 +2985,7 @@
p.set_transform(trans)
p.y_isdata = False
self.add_patch(p)
+ self.autoscale_view(scaley=False)
return p
axvspan.__doc__ = cbook.dedent(axvspan.__doc__) % martist.kwdocd
@@ -3027,9 +3031,11 @@
'list of Line2D to draw; see API_CHANGES')
# We do the conversion first since not all unitized data is uniform
+ # process the unit information
+ self._process_unit_info( [xmin, xmax], y, kwargs=kwargs )
y = self.convert_yunits( y )
- xmin = self.convert_xunits( xmin )
- xmax = self.convert_xunits( xmax )
+ xmin = self.convert_xunits(xmin)
+ xmax = self.convert_xunits(xmax)
if not iterable(y): y = [y]
if not iterable(xmin): xmin = [xmin]
@@ -3103,7 +3109,7 @@
'collections.LineCollection and not a '
'list of Line2D to draw; see API_CHANGES')
- self._process_unit_info(xdata=x, ydata=ymin, kwargs=kwargs)
+ self._process_unit_info(xdata=x, ydata=[ymin, ymax], kwargs=kwargs)
# We do the conversion first since not all unitized data is uniform
x = self.convert_xunits( x )
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins