[yt-users] Difficulties saving as eps

Daniel Fenn dsfenn at gmail.com
Thu Dec 11 12:13:43 PST 2014


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])

*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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141211/4777c38f/attachment-0001.htm>
-------------- 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