|
From: <as...@us...> - 2009-04-27 23:30:23
|
Revision: 7067
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7067&view=rev
Author: astraw
Date: 2009-04-27 23:30:20 +0000 (Mon, 27 Apr 2009)
Log Message:
-----------
Don't raise error in boxplot() when a location has no observations.
Fixes "IndexError: index out of range for array".
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/axes.py
Modified: trunk/matplotlib/lib/matplotlib/axes.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/axes.py 2009-04-26 10:29:30 UTC (rev 7066)
+++ trunk/matplotlib/lib/matplotlib/axes.py 2009-04-27 23:30:20 UTC (rev 7067)
@@ -4856,6 +4856,9 @@
for i,pos in enumerate(positions):
d = np.ravel(x[i])
row = len(d)
+ if row==0:
+ # no data, skip this position
+ continue
# get median and quartiles
q1, med, q3 = mlab.prctile(d,[25,50,75])
# get high extreme
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|