<div dir="ltr">I just did the following (after using the patch to BoxLib 1-d data) here:<div><br></div><div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-request/1153/fixe-to-boxlib-geometry-read/diff">https://bitbucket.org/yt_analysis/yt/pull-request/1153/fixe-to-boxlib-geometry-read/diff</a><br>
</div><div><br></div><div><br></div><div><div>import yt</div></div><div><br></div><div><div>ds = yt.load("sod_x_plt00032")</div></div><div>dd = ds.all_data()<br></div></div><div><br></div><div><div>import numpy as np</div>
</div><div><div>x = dd["x"]</div></div><div><div>ix = np.argsort(x)</div></div><div><br></div><div>import pylab</div><div><div>pylab.plot(x[ix], dd["density"][ix])</div></div><div><div>pylab.savefig("test.png")</div>
</div><div><br></div><div><br></div><div>and this gave me a nice plot of the 1-d data.  This is using the latest development version of yt. </div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Tue, Aug 19, 2014 at 4:39 AM, Hao Wang <span dir="ltr"><<a href="mailto:hwang.phy@gmail.com" target="_blank">hwang.phy@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div dir="ltr">Hi all,
<div><br></div><div>I'm trying to plot the density profile of a 1D simulation, but can't find any instruction on how to do this.</div><div><br></div><div>I tried ray=pf.h.ortho_ray(0,[ord1,ord2]) with several different ord1 and ord2, including [0.5, 0.5]; while "ray['x']" returns an array of values, "ray[FieldName]" (where FieldName can be Density, TotalEnergy, GasEnergy, etc) returns nothing but "YTArray([],dtype=float 64) (dimensionless)". </div>



<div><br></div><div>Using ortho_ray on the 2D simulation of the same problem gives correct answer. Also, the "all_data" and "sphere" object do not work for 1D (they work for 2D, too).</div><div><br></div>


<div>Thanks,</div><div><br></div><div>Hao</div></div>
<br>_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
<br></blockquote></div><br><br clear="all"><div><br></div>-- <br><div>Michael Zingale</div><div>Associate Professor</div><div><br></div><div>Dept. of Physics & Astronomy • Stony Brook University • Stony Brook, NY 11794-3800</div>
<div><i>phone</i>:  631-632-8225</div><div><i>e-mail</i>: <a href="mailto:Michael.Zingale@stonybrook.edu" target="_blank">Michael.Zingale@stonybrook.edu</a></div><div><i>web</i>: <a href="http://www.astro.sunysb.edu/mzingale" target="_blank">http://www.astro.sunysb.edu/mzingale</a></div>

</div>