From: <jd...@us...> - 2008-04-09 18:54:57
|
Revision: 5033 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5033&view=rev Author: jdh2358 Date: 2008-04-09 11:54:54 -0700 (Wed, 09 Apr 2008) Log Message: ----------- small fix for vlines w/ len 1 args Modified Paths: -------------- branches/v0_91_maint/lib/matplotlib/axes.py Modified: branches/v0_91_maint/lib/matplotlib/axes.py =================================================================== --- branches/v0_91_maint/lib/matplotlib/axes.py 2008-04-07 22:26:21 UTC (rev 5032) +++ branches/v0_91_maint/lib/matplotlib/axes.py 2008-04-09 18:54:54 UTC (rev 5033) @@ -2442,10 +2442,11 @@ y = npy.asarray(y) if len(xmin)==1: - xmin = xmin*npy.ones(y.shape, y.dtype) + xmin = npy.resize( xmin, y.shape ) if len(xmax)==1: - xmax = xmax*npy.ones(y.shape, y.dtype) + xmax = npy.resize( xmax, y.shape ) + xmin = npy.asarray(xmin) xmax = npy.asarray(xmax) @@ -2512,7 +2513,12 @@ ymin = npy.asarray(ymin) ymax = npy.asarray(ymax) + if len(ymin)==1: + ymin = npy.resize( ymin, x.shape ) + if len(ymax)==1: + ymax = npy.resize( ymax, x.shape ) + if len(ymin)!=len(x): raise ValueError, 'ymin and x are unequal sized sequences' if len(ymax)!=len(x): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |