<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>From the matplotlib faq:</div><div><br></div><div><div class="section" id="obtaining-matplotlib-version"><div class="highlight-python"><div class="highlight" style="background-color: rgb(238, 255, 204); background-position: initial initial; background-repeat: initial initial; "><pre style="font-family: Consolas, 'Deja Vu Sans Mono', 'Bitstream Vera Sans Mono', monospace; font-size: 0.95em; letter-spacing: 0.015em; padding: 0.5em; border: 1px solid rgb(204, 204, 204); background-color: rgb(248, 248, 248); line-height: 15px; "><span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="kn" style="color: rgb(0, 112, 32); font-weight: bold; ">import</span> <span class="nn" style="color: rgb(14, 132, 181); font-weight: bold; ">matplotlib</span>
<span class="gp" style="color: rgb(198, 93, 9); font-weight: bold; ">>>> </span><span class="n">matplotlib</span><span class="o" style="color: rgb(102, 102, 102); ">.</span><span class="n">__version__</span>
<span class="go" style="color: rgb(48, 48, 48); ">'0.98.0'</span>
</pre></div></div></div><div class="section" id="matplotlib-install-location"><span id="locating-matplotlib-install" style="color: rgb(0, 0, 0); font-family: 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 21px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); "></span></div></div><div><br></div>Cheers,<br><div>
<div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><span class="Apple-style-span" style="border-collapse: separate; color: rgb(0, 0, 0); font-family: Helvetica; font-size: medium; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-border-horizontal-spacing: 0px; -webkit-border-vertical-spacing: 0px; -webkit-text-decorations-in-effect: none; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Nathan Goldbaum<br>Graduate Student<br>Astronomy & Astrophysics, UCSC<br><a href="mailto:goldbaum@ucolick.org">goldbaum@ucolick.org</a><br>http://www.ucolick.org/~goldbaum</div></span></div></span></div>
</div>
<br><div><div>On Jun 27, 2012, at 2:38 PM, Christine Simpson wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div>In the beginning I did just what Sam suggested and it didn't look that<br>great, but maybe I need to up the dpi more.  The one tricky thing I<br>found in converting the png's to pdf's by hand was getting the colors to<br>come out right.  I used ImageMagick and had to specify the -type flag to<br>get it to come out right.<br><br>I will try emailing the matplotlib users list.  Silly question: how do I<br>determine the version number of matplotlib in my yt installation?<br><br>Christine<br><br>On Wed, 2012-06-27 at 14:28 -0700, Nathan Goldbaum wrote:<br><blockquote type="cite">This is a long-standing bug in matplotlib (discussed<br></blockquote><blockquote type="cite">here: <a href="http://sourceforge.net/mailarchive/forum.php?thread_name=4D2DF596.3060503%40hawaii.edu&forum_name=matplotlib-users">http://sourceforge.net/mailarchive/forum.php?thread_name=4D2DF596.3060503%40hawaii.edu&forum_name=matplotlib-users</a>)<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">It may be a bit of work on your part to make a simple script that<br></blockquote><blockquote type="cite">reproduces the bug, but I think it would be worthwhile to report this<br></blockquote><blockquote type="cite">on matplotlib-users and so that we can get an official response from<br></blockquote><blockquote type="cite">the matplotlib developers.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">I did and bit of googling but unfortunately I can't find a simple fix<br></blockquote><blockquote type="cite">for this beyond Sam's suggestion to do the conversion to vector<br></blockquote><blockquote type="cite">graphics by hand.<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Cheers,<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">Nathan Goldbaum<br></blockquote><blockquote type="cite">Graduate Student<br></blockquote><blockquote type="cite">Astronomy & Astrophysics, UCSC<br></blockquote><blockquote type="cite"><a href="mailto:goldbaum@ucolick.org">goldbaum@ucolick.org</a><br></blockquote><blockquote type="cite"><a href="http://www.ucolick.org/~goldbaum">http://www.ucolick.org/~goldbaum</a><br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">On Jun 27, 2012, at 2:17 PM, Sam Skillman wrote:<br></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite"><blockquote type="cite">Hi Christine,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">This doesn't fix the underlying issue, but I usually just dump the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">pngs out with a high dpi and use a conversion from png to eps.  If<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">you have Gimp, you may want to give this a shot:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://code.google.com/p/agpy/source/browse/trunk/contributed/pngtoeps?r=247">http://code.google.com/p/agpy/source/browse/trunk/contributed/pngtoeps?r=247</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Others might have better ideas, but my guess is a lot of them will<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">deal with modifying your matplotlib backend, which I've never had<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">great luck with for vector formats.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Best,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">Sam<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">On Wed, Jun 27, 2012 at 3:10 PM, Christine Simpson<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><<a href="mailto:csimpson@astro.columbia.edu">csimpson@astro.columbia.edu</a>> wrote:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        Hi everyone,<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        I have a question that may be more of a matplotlib question<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        than a yt<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        question, but it's an issue with some yt generated figures I<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        have, so I<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        thought I'd ask it here.  I think there was some discussion<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        of this on<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        the list a while ago but I can't find the thread.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        When I output images that include colorbars in vector<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        formats (like pdf<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        and eps), I get these little lines running across the color<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        bar.  It<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        goes away if I output the image in a rasterized format (like<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        png).  I<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        wanted to output my images in vector format (as pdfs) so<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        everything<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        looks nice and sharp.  I've figured out how to just<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        rasterize the color<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        bar.  However, I don't want to rasterize the color bar<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        labels, and the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        way I've implemented it, the labels get rasterized too.  It<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        seems in<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        figure objects (and maybe axes objects?) there is a way to<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        specify the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        order that items get drawn and/or rasterized (through the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        zorder and<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        rasterized_zorder keywords); I've played around with this<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        but haven't<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        been able to get it to work.  The color bar is a Colorbar<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        object and it<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        doesn't seem like this class allows for adjusting the<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        rasterization<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        order of things.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        I've pasted an example script here:<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        <a href="http://paste.yt-project.org/show/2504/">http://paste.yt-project.org/show/2504/</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        I'm probably going to give up on this soon, but any advice<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        people have<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        would be greatly appreciated.<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        Christine<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        _______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        yt-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">        <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">_______________________________________________<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">yt-users mailing list<br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite"><br></blockquote></blockquote><blockquote type="cite"><blockquote type="cite">!DSPAM:10175,4feb786c2390219978230!<br></blockquote></blockquote><blockquote type="cite"><br></blockquote><blockquote type="cite">_______________________________________________<br></blockquote><blockquote type="cite">yt-users mailing list<br></blockquote><blockquote type="cite"><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br></blockquote><blockquote type="cite"><a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br></blockquote><br><br>_______________________________________________<br>yt-users mailing list<br><a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org<br><br>!DSPAM:10175,4feb7db63533321668429!<br><br></div></blockquote></div><br></body></html>