It's because the plots are not actually created until they are about to be saved to disk. This was a performance improvement that was added more recently tha. The eps writer and it looks like the eps writer was never updated to handle it.<div><br></div><div>Take a look at the validate_plot decorator in yt/visualization/plot_container.py, any function decorated with this will make sure the matplotlib figure and axes exist and have a valid plot.</div><div><br></div><div>I agree with Matt that this sounds like a great addition, very much looking forward to the pull request!<span></span><br><div><br>On Monday, August 3, 2015, Matthew Turk <<a href="mailto:matthewturk@gmail.com">matthewturk@gmail.com</a>> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Anni,<br>
<br>
I think it's just an issue with how the plots are generated -- saving<br>
makes sure they are the latestversion.  I think it would be great to<br>
push something to warn the user if it hasn't been set up yet!<br>
<br>
-MAtt<br>
<br>
On Mon, Aug 3, 2015 at 7:45 AM, Anni Järvenpää <<a href="javascript:;" onclick="_e(event, 'cvml', 'anni.jarvenpaa@gmail.com')">anni.jarvenpaa@gmail.com</a>> wrote:<br>
> Hi All,<br>
><br>
> I have been updating the eps_writer to handle a mixture of profiles, slices<br>
> and projections that can be displayed in a single plot (multiple panels).<br>
> eps_writer with my edits can be reviewed at<br>
> <a href="http://paste.yt-project.org/show/5773/" target="_blank">http://paste.yt-project.org/show/5773/</a>. However, in order to get the plot<br>
> axes to work correctly I need to save the individual plots as well before<br>
> passing them to the eps_writer.<br>
><br>
> Here is an example script: <a href="http://paste.yt-project.org/show/5772/" target="_blank">http://paste.yt-project.org/show/5772/</a>. It works<br>
> correctly as is, but uncommenting the changes in plots causes weird results<br>
> if I don't also save the individual plots. The result of saving and<br>
> not-saving are below (as you can see the plot doesn't change but the<br>
> axes/colorbar does).<br>
> <a href="http://www.mv.helsinki.fi/home/aajarven/yt/noedit.png" target="_blank">http://www.mv.helsinki.fi/home/aajarven/yt/noedit.png</a><br>
> <a href="http://www.mv.helsinki.fi/home/aajarven/yt/edits-nosave.png" target="_blank">http://www.mv.helsinki.fi/home/aajarven/yt/edits-nosave.png</a><br>
> <a href="http://www.mv.helsinki.fi/home/aajarven/yt/edits-save.png" target="_blank">http://www.mv.helsinki.fi/home/aajarven/yt/edits-save.png</a><br>
><br>
> Does anyone know why the plots must be saved before being handed to the<br>
> eps_writer api?<br>
> I'd like to push these changes to the eps_writer and could possibly raise<br>
> the save as a bug?<br>
><br>
> Let me know.<br>
><br>
> Anni<br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="javascript:;" onclick="_e(event, 'cvml', 'yt-users@lists.spacepope.org')">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="javascript:;" onclick="_e(event, 'cvml', 'yt-users@lists.spacepope.org')">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</blockquote></div></div>