Revision: 7608
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7608&view=rev
Author:   leejjoon
Date:     2009-08-31 00:38:43 +0000 (Mon, 31 Aug 2009)

Log Message:
-----------
Merged revisions 7607 via svnmerge from 
https://matplotlib.svn.sourceforge.net/svnroot/matplotlib/branches/v0_99_maint

........
  r7607 | leejjoon | 2009-08-30 20:32:12 -0400 (Sun, 30 Aug 2009) | 1 line
  
  fix sf bug #2839919
........

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/legend.py

Property Changed:
----------------
    trunk/matplotlib/


Property changes on: trunk/matplotlib
___________________________________________________________________
Modified: svnmerge-integrated
   - /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7600
   + /branches/mathtex:1-7263 /branches/v0_98_5_maint:1-7253 
/branches/v0_99_maint:1-7607

Modified: trunk/matplotlib/lib/matplotlib/legend.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/legend.py   2009-08-31 00:32:12 UTC (rev 
7607)
+++ trunk/matplotlib/lib/matplotlib/legend.py   2009-08-31 00:38:43 UTC (rev 
7608)
@@ -591,8 +591,9 @@
         # We calculate number of lows in each column. The first
         # (num_largecol) columns will have (nrows+1) rows, and remaing
         # (num_smallcol) columns will have (nrows) rows.
-        nrows, num_largecol = divmod(len(handleboxes), self._ncol)
-        num_smallcol = self._ncol-num_largecol
+        ncol = min(self._ncol, len(handleboxes))
+        nrows, num_largecol = divmod(len(handleboxes), ncol)
+        num_smallcol = ncol-num_largecol
 
         # starting index of each column and number of rows in it.
         largecol = safezip(range(0, num_largecol*(nrows+1), (nrows+1)),
@@ -860,3 +861,4 @@
 
         return ox, oy
 
+


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to