Revision: 6661
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6661&view=rev
Author:   mdboom
Date:     2008-12-18 13:41:35 +0000 (Thu, 18 Dec 2008)

Log Message:
-----------
Fix bug where a line with NULL data limits prevents subsequent data limits from 
calculating correctly

Modified Paths:
--------------
    branches/v0_98_5_maint/CHANGELOG
    branches/v0_98_5_maint/src/_path.cpp

Modified: branches/v0_98_5_maint/CHANGELOG
===================================================================
--- branches/v0_98_5_maint/CHANGELOG    2008-12-18 12:10:51 UTC (rev 6660)
+++ branches/v0_98_5_maint/CHANGELOG    2008-12-18 13:41:35 UTC (rev 6661)
@@ -1,3 +1,8 @@
+2008-12-18 Fix bug where a line with NULL data limits prevents
+           subsequent data limits from calculating correctly - MGD
+
+2008-12-17 Major documentation generator changes - MGD
+
 2008-12-17 Applied macosx backend patch with support for path
            collections, quadmesh, etc... - JDH
 
@@ -3,4 +8,5 @@
 2008-12-17 fix dpi-dependent behavior of text bbox and arrow in annotate
             -JJL
+
 2008-12-16 Another attempt to fix dpi-dependent behavior of Legend. -JJL
 

Modified: branches/v0_98_5_maint/src/_path.cpp
===================================================================
--- branches/v0_98_5_maint/src/_path.cpp        2008-12-18 12:10:51 UTC (rev 
6660)
+++ branches/v0_98_5_maint/src/_path.cpp        2008-12-18 13:41:35 UTC (rev 
6661)
@@ -403,10 +403,25 @@
         }
         else
         {
-            extents_data[0] = std::min(x0, x1);
-            extents_data[1] = std::min(y0, y1);
-            extents_data[2] = std::max(x0, x1);
-            extents_data[3] = std::max(y0, y1);
+            if (x0 > x1)
+            {
+                extents_data[0] = std::numeric_limits<double>::infinity();
+                extents_data[2] = -std::numeric_limits<double>::infinity();
+            }
+            else
+            {
+                extents_data[0] = x0;
+                extents_data[2] = x1;
+            }
+            if (y0 > y1) {
+                extents_data[1] = std::numeric_limits<double>::infinity();
+                extents_data[3] = -std::numeric_limits<double>::infinity();
+            }
+            else
+            {
+                extents_data[1] = y0;
+                extents_data[3] = y1;
+            }
             minpos_data[0] = xm;
             minpos_data[1] = ym;
         }


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

------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you.  Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to