[yt-users] set_xlim problem in ProfilePlot

Chuhong Mai cmai4 at asu.edu
Mon Mar 13 21:27:21 PDT 2017


Hi yt-users,

I am pretty new to yt. I am using ProfilePlot to visualize Flash output
data and find that set_xlim is not functioning as expected. Here's my
script:

import yt
ds=yt.load('bondiAccr_mgd_fullmass_eddi_try24_plt_cnt_9217')
ad=ds.all_data()
plot=yt.ProfilePlot(ad,"r",["sound_speed"])
plot.set_unit("r","cm")
plot.set_xlim(2.5e12, 2.5e13)
plot.set_ylim(5e8, 1e10)
plot.save()

[image: Inline image 1]
While set_ylim functions as expected, set_xlim does cut the range of the
data but not the axis itself. What can I do to cut the x axis to the range
I want? Thank you very much!

Best,
Chuhong

------------------------------------------------------------------------------------------
Chuhong Mai,
PhD Student,
NASA Earth & Space Science Fellow,
School of Earth & Space Exploration,
Arizona State University
Email: Chuhong.Mai at asu.edu
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170313/0e55f2b3/attachment-0001.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Screen Shot 2017-03-13 at 9.24.10 PM.png
Type: image/png
Size: 18472 bytes
Desc: not available
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20170313/0e55f2b3/attachment-0001.png>


More information about the yt-users mailing list