[yt-users] how to fix a constant density scale to all out figures?

Reju Sam John rejusamjohn at gmail.com
Mon Aug 5 06:00:54 PDT 2013


Dear Suoqing JI,

Now its working...
Thank you very much...


On Mon, Aug 5, 2013 at 6:18 PM, Suoqing JI <jisuoqing at gmail.com> wrote:

> Hi Reju,
>
> what are the other arguments i have to give.
>
>
> I believe another argument which should be provided is the variable name
> you would like to control, say, change
>
>     slc.set_zlim(5e-31,1e-29)
>
>
> to:
>
>  slc.set_zlim('Density', 5e-31, 1e-29)
>
> This helps if you have multiple variable to plot in the same figure and
> want to control them separately.
>
> Best wishes,
> Suoqing
>
>
> On Aug 5, 2013, at 8:31 PM, Reju Sam John <rejusamjohn at gmail.com> wrote:
>
> Dear Latif,
>
> I have done the modification. it is giving the following error.
>
>
>  Traceback (most recent call last):
>   File "slice_plot_const_density_scle.py", line 11, in <module>
>     slc.set_zlim(5e-31,1e-29)
>   File
> "/data1/pdf/csurajit/yt-x86_64/src/yt-hg/yt/visualization/plot_window.py",
> line 99, in newfunc
>     rv = f(*args, **kwargs)
> TypeError: set_zlim() takes at least 4 arguments (3 given)
>
> what are the other arguments i have to give.
>
> my script is  this...
>
> from yt.mods import *
> file1="/app/run/csarkar/surajit/simulation_shock/simulation5/RD00"
> file2="/RedshiftOutput00"
> for kk in range(10, 67):
>     fn_i=str(kk)
>     fn=file1+fn_i+file2+fn_i # parameter file to load
>     print fn
>     pf = load(fn) # load data
>     slc = SlicePlot(pf, 'z', ['Density'], center=[0.5,0.5,0.5],
> width=(128,'mpc'))
>     slc.set_zlim(5e-31,1e-29)
>     #slc.SlicePlot.set_zlim(10e-31,10e-26, nticks = 6)
>     #slc.set_zlim(10e-31,10e-26, nticks = 6)
>     slc.save()
>
>
>
>
>
> On Mon, Aug 5, 2013 at 5:46 PM, Latif <latifne at gmail.com> wrote:
>
>> Hi Reju,
>> You can set plot limits with the following command. For further details
>> have a look at documentation.
>>
>> p.set_zlim(5, 1e2)
>>
>> http://yt-project.org/doc/cookbook/complex_plots.html
>>
>> I hope it helps.
>> Cheers
>> Latif
>>
>>
>> On Mon, Aug 5, 2013 at 1:45 PM, Reju Sam John <rejusamjohn at gmail.com>wrote:
>>
>>> Dear all,
>>>
>>> I am trying to visualize the density slices of my simulation  output at
>>> different red-shift. But the output files
>>> (RedshiftOutput0010_Slice_z_Density.png to
>>> RedshiftOutput0058_Slice_z_Density.png) are density color coded
>>> differently. My problem is how to make the density color code scale common
>>> for all.
>>>
>>>
>>> --
>>> Reju Sam John
>>>
>>> _______________________________________________
>>> yt-users mailing list
>>> yt-users at lists.spacepope.org
>>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>>
>>>
>>
>> _______________________________________________
>> yt-users mailing list
>> yt-users at lists.spacepope.org
>> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>>
>>
>
>
> --
> Reju Sam John
>  _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>
>
> _______________________________________________
> yt-users mailing list
> yt-users at lists.spacepope.org
> http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
>
>


-- 
Reju Sam John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20130805/414e7fa8/attachment.html>


More information about the yt-users mailing list