|
From: <ef...@us...> - 2008-04-23 07:21:22
|
Revision: 5063
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=5063&view=rev
Author: efiring
Date: 2008-04-23 00:21:03 -0700 (Wed, 23 Apr 2008)
Log Message:
-----------
Update dataLim only if some valid data are available.
This change means that plot([nan]) will generate an
empty plot instead of raising an obscure exception.
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/transforms.py
Modified: trunk/matplotlib/lib/matplotlib/transforms.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/transforms.py 2008-04-22 18:55:36 UTC (rev 5062)
+++ trunk/matplotlib/lib/matplotlib/transforms.py 2008-04-23 07:21:03 UTC (rev 5063)
@@ -693,6 +693,9 @@
if len(xy) == 0:
return
+ xym = ma.masked_invalid(xy)
+ if (xym.count(axis=1)!=2).all():
+ return
points, minpos, changed = update_path_extents(
Path(xy), None, self._points, self._minpos, ignore)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|