[yt-users] colorbar rasterization

Christine Simpson csimpson at astro.columbia.edu
Wed Jun 27 14:10:36 PDT 2012


Hi everyone,

I have a question that may be more of a matplotlib question than a yt
question, but it's an issue with some yt generated figures I have, so I
thought I'd ask it here.  I think there was some discussion of this on
the list a while ago but I can't find the thread.

When I output images that include colorbars in vector formats (like pdf
and eps), I get these little lines running across the color bar.  It
goes away if I output the image in a rasterized format (like png).  I
wanted to output my images in vector format (as pdfs) so everything
looks nice and sharp.  I've figured out how to just rasterize the color
bar.  However, I don't want to rasterize the color bar labels, and the
way I've implemented it, the labels get rasterized too.  It seems in
figure objects (and maybe axes objects?) there is a way to specify the
order that items get drawn and/or rasterized (through the zorder and
rasterized_zorder keywords); I've played around with this but haven't
been able to get it to work.  The color bar is a Colorbar object and it
doesn't seem like this class allows for adjusting the rasterization
order of things.

I've pasted an example script here:
http://paste.yt-project.org/show/2504/
I'm probably going to give up on this soon, but any advice people have
would be greatly appreciated.

Christine





More information about the yt-users mailing list