Revision: 8749
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8749&view=rev
Author:   mdboom
Date:     2010-10-12 19:13:09 +0000 (Tue, 12 Oct 2010)

Log Message:
-----------
Safer handling of the minimum positive value in log locators.

Modified Paths:
--------------
    branches/v1_0_maint/lib/matplotlib/ticker.py

Modified: branches/v1_0_maint/lib/matplotlib/ticker.py
===================================================================
--- branches/v1_0_maint/lib/matplotlib/ticker.py        2010-10-12 17:23:36 UTC 
(rev 8748)
+++ branches/v1_0_maint/lib/matplotlib/ticker.py        2010-10-12 19:13:09 UTC 
(rev 8749)
@@ -1244,7 +1244,7 @@
 
         if vmin <= 0.0:
             vmin = self.axis.get_minpos()
-            if vmin <= 0.0:
+            if vmin <= 0.0 or not np.isfinite(vmin):
                 raise ValueError(
                     "Data has no positive values, and therefore can not be 
log-scaled.")
 
@@ -1292,7 +1292,7 @@
 
         minpos = self.axis.get_minpos()
 
-        if minpos<=0:
+        if minpos<=0 or not np.isfinite(minpos):
             raise ValueError(
                 "Data has no positive values, and therefore can not be 
log-scaled.")
 


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

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to