[yt-users] EPS.single_plot() interface

John Wise jwise at physics.gatech.edu
Wed Nov 6 06:28:11 PST 2013


That version should be fine.  I just used that version on my *buntu 
13.10 machine.  It also worked on a 13.04 machine with an old svn 
checkout (before 0.12) of PyX.

As a warning, don't use the PyX svn repository because since July or 
August, it's only compatible with Python 3.

Could you try this script to see if it works for you?  It works on two 
of my computers.

http://paste.yt-project.org/show/4031/

Thanks,
John

On 11/06/2013 09:13 AM, John Regan wrote:
> Version Info:
>
> Metadata-Version: 1.1
> Name: PyX
> Version: 0.12.1
> Summary: Python package for the generation of PostScript and PDF files
> Home-page: http://pyx.sourceforge.net/
> Author: Jörg Lehmann, André Wobst
>
>
> Maybe an upgrade is needed?
>
>
> On 6 November 2013 16:09, John Wise <jwise at physics.gatech.edu
> <mailto:jwise at physics.gatech.edu>> wrote:
>
>     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>
>         <mailto: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>
>
>              <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>
>         <mailto: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>
>
>
>         <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>
>         <mailto: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>
>
>         <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 <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