Revision: 6745
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6745&view=rev
Author: mmetz_bn
Date: 2009-01-06 18:59:31 +0000 (Tue, 06 Jan 2009)
Log Message:
-----------
Fault tolerant handling of linestyles when too many
Modified Paths:
--------------
trunk/matplotlib/CHANGELOG
trunk/matplotlib/lib/matplotlib/contour.py
Modified: trunk/matplotlib/CHANGELOG
===================================================================
--- trunk/matplotlib/CHANGELOG 2009-01-06 17:24:32 UTC (rev 6744)
+++ trunk/matplotlib/CHANGELOG 2009-01-06 18:59:31 UTC (rev 6745)
@@ -1,3 +1,5 @@
+2009-01-06 Be fault tolerant when len(linestyles)>NLev in contour. - MM
+
2009-01-06 Added marginals kwarg to hexbin to plot marginal densities
JDH
Modified: trunk/matplotlib/lib/matplotlib/contour.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/contour.py 2009-01-06 17:24:32 UTC (rev
6744)
+++ trunk/matplotlib/lib/matplotlib/contour.py 2009-01-06 18:59:31 UTC (rev
6745)
@@ -860,8 +860,10 @@
else:
if cbook.is_string_like(linestyles):
tlinestyles = [linestyles] * Nlev
- elif cbook.iterable(linestyles) and len(linestyles) <= Nlev:
+ elif cbook.iterable(linestyles) and len(linestyles) < Nlev:
tlinestyles = list(linestyles) *
int(np.ceil(Nlev/len(linestyles)))
+ elif cbook.iterable(linestyles): # len(linestyles) >= Nlev
+ tlinestyles = list(linestyles)[:Nlev]
return tlinestyles
def get_alpha(self):
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It is the best place to buy or sell services for
just about anything Open Source.
http://p.sf.net/sfu/Xq1LFB
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins