<meta http-equiv="Content-Type" content="text/html; charset=utf-8"><div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Jan 13, 2016 at 2:13 PM, Junhwan Choi (최준환) <span dir="ltr"><<a href="mailto:choi.junhwan@gmail.com" target="_blank">choi.junhwan@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hi Nathan,<br>
<br>
Thank you for your advice.<br>
I try to replace PlotCollection to SlicePlot and I got error.<br>
I find that I have to pass the normal vector and field name when I<br>
call the SlicePlot/ProjectionPlot from the beginning unlike the<br>
PlotCollection..<br>
It looks like that it limit the SlicePlot get only one perspective at<br>
once in the multi plot.<br>
[Am I correct?]<br>
However, as you see my script, I would like to show three different<br>
perspective at once and it was done by add_slice to PlotCollection<br>
previously.<br>
In addition, if this is the case, I cannot make multi plot mixed with<br>
slice and projection.<br>
It looks like that replacing  the PlotCollection  simply SlicePlot and<br>
ProjectionPlot limit the potability of yt…..<br>
There should be other way to go…..<br></blockquote><div><br></div><div>So I'm not very familiar with the eps writer (John Wise added this functionality added the ability to use SlicePlot and ProjectionPlot), so take what I'm saying worth a grain of salt.</div><div><br></div><div>I think the solution is to pass in multiple different SlicePlot and ProjectionPlot instances.</div><div><br></div><div>See this page in the docs:</div><div><br></div><div><a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__yt-2Dproject.org_doc_visualizing_plots.html-23publication-2Dready-2Dfigures&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=FPLz_lU96fZ_lD-bbKILF-hG8bKxo1fy9M7MJlw7yp8&s=H0isNvbLDfkTHBzGjtC9kCHf7LGCp0678j6NqPS-eng&e=">http://yt-project.org/doc/visualizing/plots.html#publication-ready-figures</a></div><div><br></div><div>Unfortunately I won't have time to look into this more closely in the next day or two.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
Thank you,<br>
Junhwan<br>
<div class=""><div class="h5"><br>
<br>
<br>
<br>
On Wed, Jan 13, 2016 at 1:52 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>> wrote:<br>
> SlicePlot and ProjectionPlot should work with the eps_writer.<br>
><br>
><br>
> On Wednesday, January 13, 2016, Junhwan Choi (최준환) <<a href="mailto:choi.junhwan@gmail.com">choi.junhwan@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi yt user,<br>
>><br>
>> I have old yt script (with yt-2.7-ish) with eps_writer module that<br>
>> makes 3x3 multi panel slice plot as follow<br>
>> =================================<br>
>> import matplotlib as matplotlib<br>
>> matplotlib.use('Agg')<br>
>> import matplotlib.pylab as pylab<br>
>> from yt.mods import *<br>
>> import yt.visualization.eps_writer as eps<br>
>> import pyx<br>
>> import pylab as pl<br>
>><br>
>> pl.ion()<br>
>> pl.clf()<br>
>><br>
>> # load up a dataset<br>
>> LBOX1 = 4000<br>
>> LBOX2 = 4<br>
>> LBOX3 = 0.04<br>
>><br>
>> index = 66<br>
>> pf = load("../DD%04d/DD%04d" % (index,index))<br>
>> den_center = pf.h.find_max("Density")[1]<br>
>> # create density slices<br>
>> pc = PlotCollection(pf, center=den_center)<br>
>><br>
>> p1 =pc.add_slice("Density", "z", center=den_center, use_colorbar=False)<br>
>> p2 =pc.add_slice("Density", "x", center=den_center, use_colorbar=False)<br>
>> p3 =pc.add_slice("Density", "y", center=den_center, use_colorbar=False)<br>
>><br>
>> p1.set_zlim(1e-27, 1e-20)<br>
>> p2.set_zlim(1e-27, 1e-20)<br>
>> p3.set_zlim(1e-27, 1e-20)<br>
>><br>
>> p4 =pc.add_slice("Density", "z",center=den_center, use_colorbar=False)<br>
>> p5 =pc.add_slice("Density", "x",center=den_center, use_colorbar=False)<br>
>> p6 =pc.add_slice("Density", "y",center=den_center, use_colorbar=False)<br>
>><br>
>> p4.set_zlim(2e-20, 2e-14)<br>
>> p5.set_zlim(2e-20, 2e-14)<br>
>> p6.set_zlim(2e-20, 2e-14)<br>
>><br>
>> p7 =pc.add_slice("Density", "z",center=den_center, use_colorbar=False)<br>
>> p8 =pc.add_slice("Density", "x",center=den_center, use_colorbar=False)<br>
>> p9 =pc.add_slice("Density", "y",center=den_center, use_colorbar=False)<br>
>><br>
>> p7.set_zlim(2e-16, 2e-10)<br>
>> p8.set_zlim(2e-16, 2e-10)<br>
>> p9.set_zlim(2e-16, 2e-10)<br>
>><br>
>> p1.set_width(LBOX1,"pc")<br>
>> p2.set_width(LBOX1,"pc")<br>
>> p3.set_width(LBOX1,"pc")<br>
>><br>
>> p4.set_width(LBOX2,"pc")<br>
>> p5.set_width(LBOX2,"pc")<br>
>> p6.set_width(LBOX2,"pc")<br>
>><br>
>> p7.set_width(LBOX3,"pc")<br>
>> p8.set_width(LBOX3,"pc")<br>
>> p9.set_width(LBOX3,"pc")<br>
>><br>
>> ep = eps.multiplot_yt(3,3,pc,bare_axes = True)<br>
>> ep.title_box("xy", loc=(0.1,2.95))<br>
>> ep.title_box("yz", loc=(1.1,2.95))<br>
>> ep.title_box("xz", loc=(2.1,2.95))<br>
>> ep.scale_line(label="%6.0f kpc" % (LBOX1/4000.0), size=0.25,<br>
>> linewidth=pyx.style.linewidth.Thick, loc=(0.05,3.08))<br>
>> ep.scale_line(label="%6.0f pc"  % (LBOX2/4.0)   , size=0.25,<br>
>> linewidth=pyx.style.linewidth.Thick, loc=(0.05,2.08))<br>
>> ep.scale_line(label="%6.2f pc"  % (LBOX3/4.0)   , size=0.25,<br>
>> linewidth=pyx.style.linewidth.Thick, loc=(0.05,1.08))<br>
>> ep.save_fig("VelDenSlice4R_%04d"  % (index) )<br>
>> pl.clf()<br>
>> ==================================<br>
>><br>
>> And, now I would like to port to the latest yt.<br>
>> I could make most of changes but I found that there is no<br>
>> PlotCollection which can pass the figures to eps.multiplot_yt any<br>
>> more.<br>
>> Is there any alternative way to replace the what PlotCollection and<br>
>> add_slice did?<br>
>> I also need to include the annotate_xxx so that using imshow is not a<br>
>> good option for me.<br>
>><br>
>> Thanks in advance,<br>
>> Junhwan Choi<br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.spacepope.org_listinfo.cgi_yt-2Dusers-2Dspacepope.org&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=FPLz_lU96fZ_lD-bbKILF-hG8bKxo1fy9M7MJlw7yp8&s=GubLNKElzbPCzNId5xO6sKr-ARYLzW81tkQIIKRjDv4&e=" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.spacepope.org_listinfo.cgi_yt-2Dusers-2Dspacepope.org&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=FPLz_lU96fZ_lD-bbKILF-hG8bKxo1fy9M7MJlw7yp8&s=GubLNKElzbPCzNId5xO6sKr-ARYLzW81tkQIIKRjDv4&e=" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="https://urldefense.proofpoint.com/v2/url?u=http-3A__lists.spacepope.org_listinfo.cgi_yt-2Dusers-2Dspacepope.org&d=BQMFaQ&c=8hUWFZcy2Z-Za5rBPlktOQ&r=hgcBC3x6dKFoTrmFmMYYbKNfiHZlGLKliIidd1LwmHI&m=FPLz_lU96fZ_lD-bbKILF-hG8bKxo1fy9M7MJlw7yp8&s=GubLNKElzbPCzNId5xO6sKr-ARYLzW81tkQIIKRjDv4&e=" rel="noreferrer" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br></div></div>