> -----Original Message----- > From: Michael Droettboom [mailto:md...@stsci.edu] > Sent: 16 Jan 2009 1:31 PM > To: Andrew Hawryluk > Cc: matplotlib-devel@lists.sourceforge.net > Subject: Re: [matplotlib-devel] path simplification can decrease the > smoothness of data plots > > Michael Droettboom wrote:
... > I've attached a patch that will only include points from the original > data in the simplified path. I hesitate to commit it to SVN, as these > things are very hard to get right -- and just because it appears to > work better on this data doesn't mean it doesn't create a regression on > something else... ;) That said, it would be nice to confirm that this > solution works, because it has the added benefit of being a little > simpler computationally. Be sure to blitz your build directory when > testing the patch -- distutils won't pick it up as a dependency. > > I've attached two PDFs -- one with the original (current trunk) > behavior, and one with the new behavior. I plotted the unsimplified > plot in thick blue behind the simplified plot in green, so you can see > how much deviation there is between the original data and the > simplified line (you'll want to zoom way in with your PDF viewer to see > it.) > > I've also included a new version of your test script which detects > "new" > data values in the simplified path, and also seeds the random number > generator so that results are comparable. I also set the > solid_joinstyle to "round", as it makes the wiggliness less pronounced. > (There was another thread on this list recently about making that the > default setting). > > Cheers, > Mike > > -- > Michael Droettboom > Science Software Branch > Operations and Engineering Division > Space Telescope Science Institute > Operated by AURA for NASA Thanks for looking into this! The new plot is much improved, and the simplified calculations are a pleasant surprise. I was also testing the previous algorithm with solid_joinstyle set to "round" as it is the default in my matplotlibrc. I am probably not able to build your patch here, unless building matplotlib from source on Windows is easier than I anticipate. May I send you some data off the list for you to test? Regards, Andrew NOVA Chemicals Research & Technology Centre Calgary, Canada ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel