|
From: <md...@us...> - 2010-10-12 19:13:15
|
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.
|