|
From: John H. <jd...@gm...> - 2010-02-18 22:39:13
|
On Thu, Feb 18, 2010 at 4:19 PM, Jakub Nowacki <j.s...@go...> wrote: > Hi, > > I work with neural models and I have problem with plotting fast spiking data. The spikes on the plot appear to have different hight which changes when I for example resize the plot window. The same problem is with saving data into files, especially in vector formats. I found the information about changing the join style, it helps a bit (rounded is the best) but doesn't solve the problem. For raster formats the workaround is to save the data in higher resolution, using DPI option. Below I included links to examples. > > Normal example (100 DPI): > https://docs.google.com/leaf?id=0B3NZY3443E1VY2JjNTc3MjAtZDI5NC00OThjLTgwY2EtNTVhMDVkZWQ2YzIw&hl=en > > Example 300 DPI: > https://docs.google.com/leaf?id=0B3NZY3443E1VNDdkMzUzNzAtMjdmNC00NjFmLTliMzMtODE5MzExMmNjNjQz&hl=en > > The problem is vector files (I'm especially interested in EPS) ignore DPI option. I've experimented with different backends and the problem is persistent on GUI and 'file-writting' back ends. I also tested it on Linux and Mac, and the outcome does't change. Creating larger figures sometimes helps a bit but not always solve the problem. > > Just to mention that plotting this kind of data is possible 'out of the box' in Matlab or XPPAut (which is not the most fancy plotting tool) I get a proper outcome. Maybe there should be a option to plot raw data in some sense, or join style function that deals with such a plots in a proper fashion. > > If you need some additional information do not hesitate to ask. Thanks for the help in advance. This is a known bug in the latest release of mpl that is fixed in svn. We do need to get a new release out soon. It is easy to fix by uncomennting the path.simplify : False line in your matplotlibrc file (the default is True). Note that path.simplify does work in the svn release of matplotlib -- it is designed to reduce paths but be imperceptible to the eye at the resolution plotted, but due to a bug in the released version it can result in improper simplifications. See http://matplotlib.sourceforge.net/users/customizing.html for information on how to change your matplotlibrc settings. JDH |