[yt-users] EPS.single_plot() interface

John Wise jwise at physics.gatech.edu
Wed Nov 6 06:09:56 PST 2013


Hi John,

Which version of PyX are you running?

Thanks,
John

On 11/06/2013 09:08 AM, John Regan wrote:
> Hi John,
>
> I pulled down your update onto my Dev installation and ran it. The eps
> writer now successfully takes as input the plot window but fails on
> saving the plot.
> Any ideas? The error is below.
>
> Cheers,
> John
>
>
>
>
> Traceback (most recent call last):
>    File
> "/homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/lib/python2.7/threading.py",
> line 810, in __bootstrap_inner
>      self.run()
>    File
> "/homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/lib/python2.7/site-packages/pyx/text.py",
> line 663, in run
>      raise RuntimeError("TeX/LaTeX finished unexpectedly")
> RuntimeError: TeX/LaTeX finished unexpectedly
>
> still waiting for tex after 5 (of 60) seconds...
> still waiting for tex after 10 (of 60) seconds...
> still waiting for tex after 15 (of 60) seconds...
> still waiting for tex after 20 (of 60) seconds...
> still waiting for tex after 25 (of 60) seconds...
> still waiting for tex after 30 (of 60) seconds...
> still waiting for tex after 35 (of 60) seconds...
> still waiting for tex after 40 (of 60) seconds...
> still waiting for tex after 45 (of 60) seconds...
> still waiting for tex after 50 (of 60) seconds...
> still waiting for tex after 55 (of 60) seconds...
> the timeout of 60 seconds expired and tex did not respond.
> We try to finish the dvi due to an unhandled tex error
> Traceback (most recent call last):
>    File "OffAxisProjection.py", line 74, in <module>
>      ep.save_fig("test", format="eps")
>    File
> "/homeappl/home/regan/appl_taito/YT/Dev/yt-x86_64/src/yt-hg/yt/visualization/eps_writer.py",
> line 779, in save_fig
>      self.canvas.writeEPSfile(filename)
>
>
> On 5 November 2013 22:44, John Wise <jwise at physics.gatech.edu
> <mailto:jwise at physics.gatech.edu>> wrote:
>
>     Hi John,
>
>     Thanks for bringing this to our attention.  I've done the same
>     workaround with eps_writer before, and it's a pain!  It seems like
>     the eps_writer was never compatible with off-axis projections.
>       Plus, it hasn't been updated to be compatible with PlotWindows.
>
>     I've made the necessary changes to eps_writer so it works with plot
>     windows now.  I've tested it with slices, projections, off-axis
>     projections, and phase plots, and they now work as desired.
>
>     I've submitted a PR, but if you want to test it out before it's
>     merged, please go ahead!
>
>     hg pull -r 49a5b85 https://bitbucket.org/jwise77/__yt-clean
>     <https://bitbucket.org/jwise77/yt-clean>
>     hg update
>
>     Let me know if this works for you.
>
>     Cheers,
>     John
>
>
>     On 11/05/2013 10:13 AM, John Regan wrote:
>
>         Hi All,
>
>
>         I've been playing with the eps interface a little to decorate some
>         plots. It's a very nice feature but I haven't been able to get in to
>         work with the output from OffAxisProjectionPlot() or
>         off_axis_projection(). Basically I call one of these functions,
>         produce
>         a nice projection and would like to pass that object to
>         eps.single_plot
>         and make some modifications.
>
>         The problem is that PWViewrMPL object has no colorbar attribute
>         and so
>         when insert_image_yt() gets called the script fails as it tries to
>         access this attribute. I can workaround the issue by creating the
>         projection and converting the image to jpg and passing the jpg
>         image to
>         insert_image() and it works great but it's not very clean. It
>         would be
>         nice to pass the PWViewrMPL object in somehow.
>
>         Just wondering if another wrapper function is needed or if there
>         is an
>         even easier way that I am missing.
>
>         Cheers,
>         John
>
>
>         _________________________________________________
>         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
>         <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 <mailto:yt-users at lists.spacepope.org>
>     http://lists.spacepope.org/__listinfo.cgi/yt-users-__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



More information about the yt-users mailing list