Revision: 7896
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7896&view=rev
Author:   mdboom
Date:     2009-10-21 13:24:33 +0000 (Wed, 21 Oct 2009)

Log Message:
-----------
Fix bug in simplification code that was clipping peaks.

Modified Paths:
--------------
    branches/v0_99_maint/src/path_converters.h

Modified: branches/v0_99_maint/src/path_converters.h
===================================================================
--- branches/v0_99_maint/src/path_converters.h  2009-10-21 13:23:47 UTC (rev 
7895)
+++ branches/v0_99_maint/src/path_converters.h  2009-10-21 13:24:33 UTC (rev 
7896)
@@ -568,11 +568,15 @@
             }
             m_after_moveto = false;
 
+            /* NOTE: We used to skip this very short segments, but if
+               you have a lot of them cumulatively, you can miss
+               maxima or minima in the data. */
+
             /* Don't render line segments less than one pixel long */
-            if (fabs(*x - m_lastx) < 1.0 && fabs(*y - m_lasty) < 1.0)
-            {
-                continue;
-            }
+            /* if (fabs(*x - m_lastx) < 1.0 && fabs(*y - m_lasty) < 1.0) */
+            /* { */
+            /*     continue; */
+            /* } */
 
             /* if we have no orig vector, set it to this vector and
                continue.  this orig vector is the reference vector we
@@ -649,7 +653,7 @@
                 }
                 else
                 {
-                    if (paradNorm2 > m_dnorm2Min)
+                    if (paradNorm2 < m_dnorm2Min)
                     {
                         m_dnorm2Min = paradNorm2;
                         m_nextX = *x;


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

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to