[yt-users] Difficulties saving as eps

Daniel Fenn dsfenn at gmail.com
Thu Dec 11 13:59:26 PST 2014


Sure--no problem.

2014-12-11 16:50 GMT-05:00 Nathan Goldbaum <nathan12343 at gmail.com>:

>
>
> On Thu, Dec 11, 2014 at 1:44 PM, Daniel Fenn <dsfenn at gmail.com> wrote:
>>
>> Thanks Nathan. I have reproduced the error using the Sedov 3D dataset,
>> and I'll file a bug report. I had originally tried just appending ".eps" to
>> the filename, as you suggested, but for some reason the quality was really
>> low--especially for text. I had better luck with the quality using just
>> ".ps", but there seemed to be some bounding box issues, as the axes and
>> colorbar were cut off.
>>
>
> These sound like bugs too.  Any chance you can open a separate issue for
> this?
>
>
>>
>> 2014-12-11 15:24 GMT-05:00 Nathan Goldbaum <nathan12343 at gmail.com>:
>>
>>
>>>
>>> On Thu, Dec 11, 2014 at 12:13 PM, Daniel Fenn <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?  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
>>>> 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
>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141211/01fe00dc/attachment-0001.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