[yt-users] set_xlim() and set_ylim() problem

Noel Scudder noel.scudder at stonybrook.edu
Tue Jul 16 14:38:43 PDT 2013


Hi yt-users,

I've got another hopefully quick problem I'm looking for help with (thanks
for bearing with me with all of my emails!).
I'm trying to create a line plot through 'add_ray' in a PlotCollection. It
is created just fine, but I can't seem to set the x and y limits of the
plot. Neither pc.set_xlim() nor ray.set_xlim() (along with the y-axis
versions) do anything.
Here is my script:

---------------------
from yt.mods import *
pf = load("plt00500")

pc = PlotCollection(pf, 'c')
ray = pc.add_ray([0.0, 5.0e9, 5.0e9],[1.e10, 5.0e9, 5.0e9], 'logden')

pc.set_ylim(-5.0, 8.0)
pc.set_xlim(0.2, 0.5)

pc.save('ray')

---------------------

But my image remains unchanged: http://i.imgur.com/1jPzHbt.png

What am I missing here? Is it not possible to set the limits on such a
plot? Thanks in advance for your help.

-Noel Scudder
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130716/45902dda/attachment.htm>


More information about the yt-users mailing list