Markus, Looking again at your image, I realized that you are probably using real data, not simulated data, therefore you can't easily use a higher grid resolution.
So, I created a test script to examine this. I have found that there is definitely a difference between filetypes. In my test script, there is a white row that occurs for pcolor, but not for pcolormesh (Note, I have a patched version of matplotlib that rasterizes pcolormesh). Also, this effect does not happen if rasterization is set to False. Lastly, the effect is more pronounced with lower-resolution data. Let me clean up the test script so that the devels to use to visualize this issue. Ben Root On Fri, May 21, 2010 at 9:45 AM, Markus Haider <markus.hai...@uibk.ac.at>wrote: > Hi, > > Thank you for your reply. > > > I have been doing some testing with pcolor() and pcolormesh() with > > regards to rasterization. I can not see a displacement when choosing > > between different file types or with setting rasterized to be True or > > False. What I have noticed is a half grid-space displacement between > > pcolor() and pcolormesh(). > > Can you see the displacement in the before enclosed pdf file? > > > You can see if this is the cause of your displacement by choosing a > > higher resolution grid. In such a case, the displacement should be > > smaller. > > How can I choose a higher resolution grid? > Thank you for your help, > Greetings, > Markus > > > Ben Root > > > > On Fri, May 21, 2010 at 5:03 AM, Markus Haider > > <markus.hai...@uibk.ac.at> wrote: > > Hello, > > > > I make colormap plots in matplotlib using pcolor or > > pcolormesh. With > > both I have a problem: > > > > If I use pcolormesh ("p2 = > > ax2.pcolormesh(10**temp,rasterized=True)") I > > get perfectly small file sizes, but the position of the > > rasterized > > colormap is a little bit displaced with respect to the frame, > > showing a > > white border on the top and right side. Is this a bug, or can > > I change > > this? > > > > If I try with pcolor, I get the > > message/usr/lib/pymodules/python2.6/matplotlib/artist.py:562: > > UserWarning: Rasterization of > > '<matplotlib.collections.PolyCollection > > object at 0x2aac890>' will be ignored > > warnings.warn("Rasterization of '%s' will be ignored" % self) > > > > > > Thank you very much for your help, > > Markus > > > > > ------------------------------------------------------------------------------ > > > > > > _______________________________________________ > > Matplotlib-devel mailing list > > Matplotlib-devel@lists.sourceforge.net > > https://lists.sourceforge.net/lists/listinfo/matplotlib-devel > > > > > > >
------------------------------------------------------------------------------
_______________________________________________ Matplotlib-devel mailing list Matplotlib-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/matplotlib-devel