[yt-users] pc.add_ray

Britton Smith brittonsmith at gmail.com
Tue Oct 19 12:28:42 PDT 2010


Hi,

Have you tried setting the limit through the plot collection, so:
pc.set_xlim(0, 10)
instead of
p.set_xlim(0, 10)

With rays, I will generally plot the data by hand using matplotlib.  You can
do something like this:
from matplotlib import pyplot
ray = pf.h.ray([0.,5.,5.], [10.,5.,5.])
pyplot.plot(ray['x'], ray['Density'])

Britton

On Tue, Oct 19, 2010 at 3:09 PM, Elizabeth Tasker <taskere at mcmaster.ca>wrote:

> Hi,
>
> I'd like to plot properties along a line through my simulation box,
> something that wasn't hard to discover how to do in yt (not least because
> Matt demonstrated it at the meeting in San Diego!):
>
> p = pc.add_ray([0.,5.,5.], [10.,5.,5.], "Density")
>
> But the plot at the end has an x-axis running from 0 to 1.0, rather than 0.
> to 10.0. I tried adding:
>
> p.set_xlim(0,10.0)
>
> but it seemed disinterested. Can I correct this?
>
> Elizabeth
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20101019/8f2e5dec/attachment.html>


More information about the yt-users mailing list