[yt-users] colorbar rasterization
Christine Simpson
csimpson at astro.columbia.edu
Wed Jun 27 14:38:55 PDT 2012
In the beginning I did just what Sam suggested and it didn't look that
great, but maybe I need to up the dpi more. The one tricky thing I
found in converting the png's to pdf's by hand was getting the colors to
come out right. I used ImageMagick and had to specify the -type flag to
get it to come out right.
I will try emailing the matplotlib users list. Silly question: how do I
determine the version number of matplotlib in my yt installation?
Christine
On Wed, 2012-06-27 at 14:28 -0700, Nathan Goldbaum wrote:
> This is a long-standing bug in matplotlib (discussed
> here: http://sourceforge.net/mailarchive/forum.php?thread_name=4D2DF596.3060503%40hawaii.edu&forum_name=matplotlib-users)
>
>
> It may be a bit of work on your part to make a simple script that
> reproduces the bug, but I think it would be worthwhile to report this
> on matplotlib-users and so that we can get an official response from
> the matplotlib developers.
>
>
> I did and bit of googling but unfortunately I can't find a simple fix
> for this beyond Sam's suggestion to do the conversion to vector
> graphics by hand.
>
>
> Cheers,
>
> Nathan Goldbaum
> Graduate Student
> Astronomy & Astrophysics, UCSC
> goldbaum at ucolick.org
> http://www.ucolick.org/~goldbaum
>
> On Jun 27, 2012, at 2:17 PM, Sam Skillman wrote:
>
> > Hi Christine,
> >
> >
> > This doesn't fix the underlying issue, but I usually just dump the
> > pngs out with a high dpi and use a conversion from png to eps. If
> > you have Gimp, you may want to give this a shot:
> > http://code.google.com/p/agpy/source/browse/trunk/contributed/pngtoeps?r=247
> >
> > Others might have better ideas, but my guess is a lot of them will
> > deal with modifying your matplotlib backend, which I've never had
> > great luck with for vector formats.
> >
> >
> > Best,
> > Sam
> >
> > On Wed, Jun 27, 2012 at 3:10 PM, Christine Simpson
> > <csimpson at astro.columbia.edu> wrote:
> > 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
> >
> >
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> > !DSPAM:10175,4feb786c2390219978230!
> > _______________________________________________
> > yt-users mailing list
> > yt-users at lists.spacepope.org
> > http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
> >
> >
> > !DSPAM:10175,4feb786c2390219978230!
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
More information about the yt-users
mailing list