[yt-users] eps_writer question

John Wise jwise at physics.gatech.edu
Fri Feb 8 08:38:14 PST 2013


Hi Junhwan,

Sorry for the delayed response and the lack of documentation. 
multiplot_yt isn't working for you because you're overwriting the 
PlotCollection for each output.  Plus, PlotCollections are designed to 
work on an individual output.

There are two ways to use eps_writer with different outputs.

1. Write the images to disk, convert them to JPEG, and include them in 
the figure.  I've uploaded the script that generated Figure 1 in

http://arxiv.org/pdf/1011.2632.pdf

to

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

2. Extract the plots from the PlotCollection into a list of plots.  Then 
eps_writer can accept this list in the argument "yt_plots".  I've 
uploaded an example to

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

that generated Figure 5 in this paper

http://arxiv.org/pdf/1206.1043.pdf

I hope these examples clears things up, and let me know if this works 
for you.

Cheers,
John

On 01/30/2013 04:32 PM, Jun-Hwan Choi wrote:
> Hi yt user,
>
> This question mostly goes to John Wise (maybe not).
> I try to use eps_writer module in the yt to generate a high-quality .eps
> figure.
> I attempt to make four phase plot (rho-T) from four different times
> (i.e. four different data output)
> But, I got the following error message:
>
> File "Phase_eps.py", line 39, in <module>
>      ep = eps.multiplot_yt(2,2,pc)
>    File
> "/home/jhchoi/common/lib/python2.7/site-packages/yt-2.4-py2.7-linux-x86_64.egg/yt/visualization/eps_writer.py",
> line 1010, in multiplot_yt
>      "x ncol(%d)." % (len(plot_col.plots), nrow, ncol)
> TypeError: not all arguments converted during string formatting
>
> It look that there is a problem when I over write PlotCollection object
> for four different data output (or maybe not).
> How can I solve the issue?
> I paste my script at http://paste.yt-project.org/show/3112/ .
>
> In addition, I would like to get more information/document about eps_writer.
> For example, I would like to write the time of four phase respectively.
> Where can I get the information about it?
>
> Thank you in advance,
> Junhwan
>
> --
> --------------------------------------------------------------
> Jun-Hwan Choi, Ph.D.
> Department of Physics and Astronomy, University of Kentucky
> Tel: (859) 897-6737        Fax: (859) 323-2846
> Email: jhchoi at pa.uky.edu <mailto:jhchoi at pa.uky.edu>   URL:
> http://www.pa.uky.edu/~jhchoi
> --------------------------------------------------------------
>
>
>
> _______________________________________________
> 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



More information about the yt-users mailing list