Plotting line with sharp peaks

Hi,

I want to plot a line with very sharp features and many data points. If I plot
the data with markers, the features can be seen perfectly. But if I choose the
line style just to be '-' (which is also default), the peaks are not shown
anymore. If I use something like '-o', the peaks are there, but the line does
not fully join the individual markers at the peak. Is the '-' style doing some
averaging before plotting or is it a rendering problem? And any suggestions
how to get rid of it?

Thanks a lot!

Stefan

Which version of matplotlib are you using? This is (I suspect) the result of a known bug in matplotlib that has been fixed since the latest release. In plots with large numbers of points, invisible points are automatically removed to increase performance and reduce file sizes, but this behavior was not fully correct.

You can either install the 0.99.x branch from SVN, or, as a workaround, set "path.simplify" to False in your matplotlibrc, at the expense of performance and file size.

Mike

stefan wrote:

···

Hi,

I want to plot a line with very sharp features and many data points. If I plot the data with markers, the features can be seen perfectly. But if I choose the line style just to be '-' (which is also default), the peaks are not shown anymore. If I use something like '-o', the peaks are there, but the line does not fully join the individual markers at the peak. Is the '-' style doing some averaging before plotting or is it a rendering problem? And any suggestions how to get rid of it?

Thanks a lot!

Stefan

------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
  
--
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA