From: <md...@us...> - 2008-12-18 13:41:39
|
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. |