[yt-users] Difficulties saving as eps
Daniel Fenn
dsfenn at gmail.com
Thu Dec 11 14:14:53 PST 2014
Ok John, will do. Thanks.
2014-12-11 17:09 GMT-05:00 John Wise <jwise at physics.gatech.edu>:
> Hi Daniel,
>
> Sorry to hear that you're having trouble with the eps_writer module in
> yt. Please assign me to the issue. I will fix this issue.
>
> Thanks,
> John
>
> On 12/11/2014 03:24 PM, Nathan Goldbaum wrote:
>
>>
>>
>> On Thu, Dec 11, 2014 at 12:13 PM, Daniel Fenn <dsfenn at gmail.com
>> <mailto:dsfenn at gmail.com>> wrote:
>>
>> Hi everyone,
>>
>> I'm having some difficulties saving a simple slice as an eps. I'm
>> following the approach in the docs, where I first do
>>
>> eps_fig = eps.single_plot(tempSlice),
>>
>> where tempSlice is the name of my slice object. This throws an error
>> in insert_image_yt() around line 477 (my line numbers might be
>> slightly different, because I've been messing with the file). The
>> error is that _p1 is not defined. Looking at the source, I can see
>> that _p1 is only conditionally defined. In my particular case,
>> self.canvas = None, so _p1 is never defined.
>>
>> There's a block of logic in the following elif block (~ line 452)
>> that looks like it's probably still applicable, but only gets called
>> for phase plots when there is a canvas defined. It sets the field
>> and defines _p1. As a temporary measure, I copied and pasted this
>> code into the self.canvas==None block, just to see if it would work.
>>
>> That seemed to get it past that issue, but then it soon runs into
>> another issue in axis_box_yt(). Around line 290, the following line
>> is executed:
>>
>> _xrange = (0, width * plot.ds[units])
>>
>>
>> This is likely because you are executing a code path that was never
>> updated for yt 3.0
>>
>> Can you reproduce this behavior using one of the test datasets on
>> yt-project.org/data <http://yt-project.org/data>? If so, can you file a
>> bug report?
>>
>> Also, FWIW, you can save a normal PlotWindow plot as eps, just append
>> .eps to the path you pass to the save() function.
>>
>>
>> /Units/ is a string with a value of "km". Trying to execute this
>> line throws a key error. I'm not exactly sure what the line is
>> trying to do, but I'm guessing the second value in the tuple is
>> supposed to be a number with a unit--perhaps something like
>> YTQuantity(width, units)?
>>
>> I'm hesitant to change too many things here, because I'm not
>> entirely sure what's going on. Are these problems that anyone else
>> has run into?
>>
>> Thanks for any input,
>>
>> Dan
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org <mailto:yt-users at lists.spacepope.org>
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
> --
> John Wise
> Assistant Professor of Physics
> Center for Relativistic Astrophysics, Georgia Tech
> http://cosmo.gatech.edu
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141211/52a10f31/attachment.html>
-------------- next part --------------
_______________________________________________
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