[yt-users] Unable to set log scale in Phase plot.

Chris Malone chris.m.malone at gmail.com
Fri Oct 31 09:04:22 PDT 2014


Hi Reju,

'x_log' and 'y_log' aren't valid arguments to the PhasePlot.  To adjust the
logscaling you need to call the set_log method that most plot objects
share.  This method takes in a field name, or 'all', and then a True or
False depending on whether you want the log turned on or off for that
field.  So, in  your case, something like

plot = PhasePlot(my_sphere, "MachNumber", "CRFractionPreCR",
"CellMassMsun", weight_field=None)
plot.set_log("MachNumber", True)
plot.set_log("CRFractionPreCR", True)

There are also methods for setting the x, y, and z range: set_xlim,
set_ylim, and set_zlim, respectively.

Chris



On Fri, Oct 31, 2014 at 8:45 AM, Reju Sam John <rejusamjohn at gmail.com>
wrote:

> Dear all,
>
> I am trying to make a phase plot using YT 2.6, with the following line.
>
>  *plot = PhasePlot(my_sphere, "Density**", "**Temperature*
> *","CellMassMsun",weight_field=None,x_log=1,y_log=1).save()*
>
> but it is giving me the following error.
> *plot = PhasePlot(my_sphere, "MachNumber",
> "CRFractionPreCR","CellMassMsun",weight_field=None,x_log=1,y_log=1).save()*
> *TypeError: __init__() got an unexpected keyword argument 'x_log'*
>
> I also tried with x_log=True.Still the same error. What could be the
> problem? How to make both x and y  in log scale?
>
> And also I would like to know is it possible to fix x and y range in phase
> plot?
>
> 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
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.spacepope.org/pipermail/yt-users-spacepope.org/attachments/20141031/e5715da2/attachment.html>


More information about the yt-users mailing list