Michael Droettboom <md...@...> writes:
> > I've checked this change into SVN so others can test it out. > > Assuming we don't discover any cases where this is clearly inferior, it > should make it into the next major release. > > Mike > Hi, This change looks good- it has the advantage of choosing points that actually lie on the curve, which is better visually, and would seem to be a better solution for publication quality plots. The method for simplifying the paths is quite simple and effective, but a bit crude- there are other algorithms you might look into for simplifying lines: http://en.wikipedia.org/wiki/Ramer-Douglas-Peucker_algorithm This one is fairly simple to implement and has the advantage that you have some control over the errors- the deviation from your simplified path and the actual path. Also, you might consider to make the path simplification tolerance (perdNorm2) an adjustable parameter in the matplotlibrc file: #src/agg_py_path_iterator.h //if the perp vector is less than some number of (squared) //pixels in size, then merge the current vector if (perpdNorm2 < (1.0 / 9.0)) kind regards, a ------------------------------------------------------------------------------ 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