rasterized colorbar

Hi all,

So I figured out the magic of "rasterized=True", which is *really* helpful!

However, the colorbar doesn't seem to accept rasterized=True, so there are little lines every facet (zoom on the attached pdf). Is there another way to get the colorbar colors rasterized?

Thanks Jody

x = linspace(0,1,1000)
X = outer(x,x)
pcolormesh(X,cmap=get_cmap('RdBu_r',lut=32),rasterized=True)
colorbar()
savefig('Test.pdf',dpi=50)

Test.pdf (17.5 KB)

Hi all,

So I figured out the magic of "rasterized=True", which is *really*
helpful!

However, the colorbar doesn't seem to accept rasterized=True, so
there are little lines every facet (zoom on the attached pdf). Is
there another way to get the colorbar colors rasterized?

Try:

cb = colorbar()
cb.solids.set_rasterized(True)

Incidentally, the lines in the pdf are an artifact of most pdf viewers, not a bug in the pdf file. It is possible that there is some way to construct the pdf files such that this does not happen, without introducing other artifacts, but we have never found one.

Eric

···

On 2012/10/26 6:00 PM, Jody Klymak wrote:

Thanks Jody
x = linspace(0,1,1000)
X = outer(x,x)
pcolormesh(X,cmap=get_cmap('RdBu_r',lut=32),rasterized=True)
colorbar()
savefig('Test.pdf',dpi=50)

--
Jody Klymak
Jody M. Klymak - UVic Ocean Physics

------------------------------------------------------------------------------
WINDOWS 8 is here.
Millions of people. Your app in 30 days.
Visit The Windows 8 Center at Sourceforge for all your go to resources.
http://windows8center.sourceforge.net/
join-generation-app-and-make-money-coding-fast/

_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options

Great! Though I think it'd have taken me a while to figure that one out!

Thanks, Jody

···

On Oct 28, 2012, at 17:47 PM, Eric Firing <efiring@...202...> wrote:

cb = colorbar()
cb.solids.set_rasterized(True)

--
Jody Klymak

I gotta agree. Is this (and the solids object) documented anywhere?

M

···

On 10/29/12 1:08 PM, Jody Klymak wrote:

On Oct 28, 2012, at 17:47 PM, Eric Firing <efiring@...202...> wrote:

cb = colorbar()
cb.solids.set_rasterized(True)

Great! Though I think it'd have taken me a while to figure that one out!

cb = colorbar()
cb.solids.set_rasterized(True)

Great! Though I think it'd have taken me a while to figure that one out!

I gotta agree. Is this (and the solids object) documented anywhere?

No, and it probably won't be any time soon. Rasterization here is a last resort work-around for buggy pdf renderers. The solids object is mentioned in the colorbar docstring as something one can modify for such workarounds (an alternative is given), but perhaps without saying what kind of a thing it is.

Eric

···

On 2012/10/29 2:00 PM, Mike Kaufman wrote:

On 10/29/12 1:08 PM, Jody Klymak wrote:

On Oct 28, 2012, at 17:47 PM, Eric Firing <efiring@...202...> wrote:

M

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_sfd2d_oct
_______________________________________________
Matplotlib-users mailing list
Matplotlib-users@lists.sourceforge.net
matplotlib-users List Signup and Options