SF.net SVN: matplotlib:[8293] trunk/matplotlib/lib/matplotlib/axes.py From: - 2010-05-04 05:24:59 ```Revision: 8293 http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8293&view=rev Author: efiring Date: 2010-05-04 05:24:53 +0000 (Tue, 04 May 2010) Log Message: ----------- hist: accept a list of scalars as equivalent to a 1-D ndarray Modified Paths: -------------- trunk/matplotlib/lib/matplotlib/axes.py Modified: trunk/matplotlib/lib/matplotlib/axes.py =================================================================== --- trunk/matplotlib/lib/matplotlib/axes.py 2010-05-03 18:37:38 UTC (rev 8292) +++ trunk/matplotlib/lib/matplotlib/axes.py 2010-05-04 05:24:53 UTC (rev 8293) @@ -6187,7 +6187,7 @@ precise point of intersection. Otherwise, the start and end points of the filled region will only occur on explicit values in the *x* array. - + *kwargs* keyword args passed on to the :class:`PolyCollection` @@ -6254,13 +6254,13 @@ return x[ind-1], y1[ind-1] elif np.ma.is_masked(diff_values[0]): return x[ind], y1[ind] - + diff_order = diff_values.argsort() diff_root_x = np.interp( 0, diff_values[diff_order], x_values[diff_order]) diff_root_y = np.interp(diff_root_x, x_values, y1_values) return diff_root_x, diff_root_y - + start = get_interp_point(ind0) end = get_interp_point(ind1) else: @@ -6272,12 +6272,12 @@ X[0] = start X[N+1] = end - + X[1:N+1,0] = xslice X[1:N+1,1] = y1slice X[N+2:,0] = xslice[::-1] X[N+2:,1] = y2slice[::-1] - + polys.append(X) collection = mcoll.PolyCollection(polys, **kwargs) @@ -7328,7 +7328,7 @@ 'hist now uses the rwidth to give relative width ' 'and not absolute width') - if isinstance(x, np.ndarray): + if isinstance(x, np.ndarray) or not iterable(x[0]): # TODO: support masked arrays; x = np.asarray(x) if x.ndim == 2: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. ```