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.

------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations 
Conference from O'Reilly Media. Velocity features a full day of 
expert-led, hands-on workshops and two days of sessions from industry 
leaders in dedicated Performance & Operations tracks. Use code vel09scf 
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to