Unable to set log scale in Phase plot.

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

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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Thank you dear Chris On Fri, Oct 31, 2014 at 9:34 PM, Chris Malone <chris.m.malone@gmail.com> wrote:
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Reju Sam John

But for PhasePlot object has no attribute set_xlim. Is there another function to set x range? Thanks On Oct 31, 2014 9:34 PM, "Chris Malone" <chris.m.malone@gmail.com> wrote:
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Hi Reju, Sorry - it looks like the set_xlim, etc. methods were added relatively recently to 2.6; see [1] for the commit that added them. Try running `yt update` to get the latest version to see if that fixes the issue. [1] https://bitbucket.org/yt_analysis/yt/commits/ad16dc5a05fdaf6cd84949869b4d847... On Sat, Nov 1, 2014 at 1:27 AM, Reju Sam John <rejusamjohn@gmail.com> wrote:
But for PhasePlot object has no attribute set_xlim. Is there another function to set x range? Thanks On Oct 31, 2014 9:34 PM, "Chris Malone" <chris.m.malone@gmail.com> wrote:
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Thanks dear Chris On Mon, Nov 3, 2014 at 8:51 PM, Chris Malone <chris.m.malone@gmail.com> wrote:
Hi Reju,
Sorry - it looks like the set_xlim, etc. methods were added relatively recently to 2.6; see [1] for the commit that added them. Try running `yt update` to get the latest version to see if that fixes the issue.
[1] https://bitbucket.org/yt_analysis/yt/commits/ad16dc5a05fdaf6cd84949869b4d847...
On Sat, Nov 1, 2014 at 1:27 AM, Reju Sam John <rejusamjohn@gmail.com> wrote:
But for PhasePlot object has no attribute set_xlim. Is there another function to set x range? Thanks On Oct 31, 2014 9:34 PM, "Chris Malone" <chris.m.malone@gmail.com> wrote:
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Reju Sam John

Hi Reju, I saw from your other email that update actually took you to yt 3.x -- apologies for that. Once you get back to 2.6 using the info at the page Nathan linked to, you can issue `hg pull` to get the latest changes, and then `hg update` to apply them to your local copy. *That* should get you the updated version in 2.6. If you have further problems, perhaps you could stop over on the IRC channel #yt for further discussion. Chris On Mon, Nov 3, 2014 at 1:04 PM, Reju Sam John <rejusamjohn@gmail.com> wrote:
Thanks dear Chris
On Mon, Nov 3, 2014 at 8:51 PM, Chris Malone <chris.m.malone@gmail.com> wrote:
Hi Reju,
Sorry - it looks like the set_xlim, etc. methods were added relatively recently to 2.6; see [1] for the commit that added them. Try running `yt update` to get the latest version to see if that fixes the issue.
[1] https://bitbucket.org/yt_analysis/yt/commits/ad16dc5a05fdaf6cd84949869b4d847...
On Sat, Nov 1, 2014 at 1:27 AM, Reju Sam John <rejusamjohn@gmail.com> wrote:
But for PhasePlot object has no attribute set_xlim. Is there another function to set x range? Thanks On Oct 31, 2014 9:34 PM, "Chris Malone" <chris.m.malone@gmail.com> wrote:
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Reju Sam John
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org

Thank you Chris. Now the functions *set_xlim()*, etc are working. Once again thank you very much. On Tue, Nov 4, 2014 at 2:52 AM, Chris Malone <chris.m.malone@gmail.com> wrote:
Hi Reju,
I saw from your other email that update actually took you to yt 3.x -- apologies for that.
Once you get back to 2.6 using the info at the page Nathan linked to, you can issue `hg pull` to get the latest changes, and then `hg update` to apply them to your local copy. *That* should get you the updated version in 2.6.
If you have further problems, perhaps you could stop over on the IRC channel #yt for further discussion.
Chris
On Mon, Nov 3, 2014 at 1:04 PM, Reju Sam John <rejusamjohn@gmail.com> wrote:
Thanks dear Chris
On Mon, Nov 3, 2014 at 8:51 PM, Chris Malone <chris.m.malone@gmail.com> wrote:
Hi Reju,
Sorry - it looks like the set_xlim, etc. methods were added relatively recently to 2.6; see [1] for the commit that added them. Try running `yt update` to get the latest version to see if that fixes the issue.
[1] https://bitbucket.org/yt_analysis/yt/commits/ad16dc5a05fdaf6cd84949869b4d847...
On Sat, Nov 1, 2014 at 1:27 AM, Reju Sam John <rejusamjohn@gmail.com> wrote:
But for PhasePlot object has no attribute set_xlim. Is there another function to set x range? Thanks On Oct 31, 2014 9:34 PM, "Chris Malone" <chris.m.malone@gmail.com> wrote:
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@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@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Reju Sam John
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
-- Reju Sam John
participants (2)
-
Chris Malone
-
Reju Sam John