[yt-users] set_zlim( ) is giving error
John Wise
jwise at physics.gatech.edu
Mon Mar 10 14:10:05 PDT 2014
Hi Reju,
The slices from the plot collection cannot be modified in that manner.
Try separating each modification in its own command. For example,
p=pc.add_slice("Temperature", 2)
p.set_log_field(False)
p.set_zlim(1e4,5e7)
pc.save()
Also, the .save() function only works on plot collections. You can use
the .save_image() or .save_pdf() functions for individual plots.
This all being said, I'd recommend moving to plot window interface, e.g.
SlicePlot(...), which enables you to act on the plot window objects,
like you original script does.
Cheers,
John
On 03/10/2014 03:19 PM, Reju Sam John wrote:
> Dear all,
> I am using the following code to create a slice plot of Temperature with
> a fixed temperature scale (1e4,5e7).
> pf = load(fn)
> pc = PlotCollection(pf)
> p=pc.add_slice("Temperature", 2).set_log_field(False)
> p.set_zlim(1e4,5e7).save()
>
> but I am getting following error
>
> p.set_zlim(1e4,5e7).save()
> AttributeError: 'NoneType' object has no attribute 'set_zlim'
>
> Please suggest me solution.
> Thank You,
>
>
> --
> Reju Sam John
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
--
John Wise
Assistant Professor of Physics
Center for Relativistic Astrophysics, Georgia Tech
http://cosmo.gatech.edu
More information about the yt-users
mailing list