It seems that pcolormesh silently ignores some of the keyword
parameters, and "rasterized" is one of them. And I'm not sure this is
intended behavior or not and I hope other developers step in.

In the meantime, use a member method explicitly.

p2 = pcolormesh(arr)
p2.set_rasterized(True)

Regards,

-JJ


On Tue, Jun 1, 2010 at 12:05 PM, Benjamin Root <ben.r...@ou.edu> wrote:
>
>
> On Tue, Jun 1, 2010 at 9:39 AM, Ryan May <rma...@gmail.com> wrote:
>>
>> On Mon, May 31, 2010 at 11:28 AM, Benjamin Root <ben.r...@ou.edu> wrote:
>> > Markus,
>> >
>> > That is good to know that it has been fixed.  As for the difference in
>> > pcolor and pcolormesh, I think it has to do with the fact that
>> > pcolormesh is
>> > composed of many lines while pcolor is composed of many polygons.  It is
>> > probably more efficient to rasterize polygons than lines.
>>
>> To be blunt, this makes no sense whatsoever.  First, pcolormesh and
>> pcolor differ in that it pcolor uses a generic PolyCollection to draw
>> the quads, while pcolormesh uses a quadmesh object, which can be more
>> efficient at the cost of generality, as it only needs to render a set
>> of identical quads. Second, if you're talking rasterized drawing, in
>> the end what gets written to a file is a 2D array of RGBA values.  It
>> doesn't matter what you use to produce the results: identical image on
>> the screen -> identical array in file.  It's possible that there are
>> slight differences that you can't really see that produce different
>> arrays, but that won't cause a factor of 8 difference in size. My
>> guess is that pcolormesh isn't rasterizing properly.
>>
> Indeed, you are right that lines aren't drawn.  I have looked back at the
> images produced by my test script that I posted to this thread and I see
> where I got confused.  The pcolormesh result in pdf and eps files have very
> faint white blocks around each quad.  At high enough data resolution, the
> color part of the quads look like lines while the white lines look like
> dots.  This happens regardless of using rasterized=True or not, and I don't
> think it is visible in png files (although I am testing some very high
> resolution png files to verify).
>
> Ben Root
>
> ------------------------------------------------------------------------------
>
>
> _______________________________________________
> 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

Reply via email to