<div dir="ltr">Hi Nathan,<br><br>Thanks!  I am no longer getting a Key Error, but the commands are simply being ignored.  Has this axis functionality been added to PhasePlot?<br><br><br></div><div class="gmail_extra"><br><br>
<div class="gmail_quote">On Tue, Jan 28, 2014 at 1:00 PM, Nathan Goldbaum <span dir="ltr"><<a href="mailto:nathan12343@gmail.com" target="_blank">nathan12343@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi Stephanie,<br>
<br>
Phase plots are keyed with the z axis name.  Try:<br>
<br>
ax = plot.plots['CellMassMsun'].axes<br>
<span class="HOEnZb"><font color="#888888"><br>
-Nathan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
On Tue, Jan 28, 2014 at 7:09 AM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>> wrote:<br>
> Hi John (and all users!),<br>
><br>
> Thanks, this definitely worked!  Now I am trying to make my axes look a bit<br>
> nicer.  I would like to change my y-axis label and rotate my x-axis<br>
> ticklabels by 45 degrees or only print every other ticklabel.  I tried to<br>
> use the directions from the SlicePlot example,<br>
> <a href="http://yt-project.org/docs/dev/cookbook/simple_plots.html#showing-and-hiding-axes-labels-and-colorbars" target="_blank">http://yt-project.org/docs/dev/cookbook/simple_plots.html#showing-and-hiding-axes-labels-and-colorbars</a>,<br>

><br>
> plot =<br>
> PhasePlot(tracerp25,"Density","z-velocity",["CellMassMsun"],weight_field=None,fontsize=13)#,x_bounds=[3e-28,5e-23],y_bounds=[-7e7,1.2e8])<br>
><br>
> plot.set_log("Density",True)<br>
> plot.set_log("z-velocity",False)<br>
> plot.set_zlim("CellMassMsun",1e4,1e9)<br>
> plot.set_figure_size(3)<br>
><br>
> ax = plot.plots['z-velocity'].axes<br>
> ax.set_ylabel(r'z-velocity (10$8$ cm/s)')<br>
> for label in ax.xaxis.get_ticklabels():<br>
>     label.set_rotation(45)<br>
><br>
> plot.save()<br>
><br>
> but get an error message:<br>
><br>
> ax = plot.plots['z-velocity'].axes<br>
> KeyError: 'z-velocity'<br>
><br>
> I get the same error if I use 'Density' on that line instead.<br>
><br>
> Thanks in advance,<br>
><br>
> Stephanie<br>
><br>
><br>
><br>
> On Mon, Jan 27, 2014 at 11:31 AM, John ZuHone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>> wrote:<br>
>><br>
>> Stephanie,<br>
>><br>
>> So you don't have to wait for me to finish this, as a workaround/hack you<br>
>> can do this:<br>
>><br>
>> pf.field_info["Density"].take_log=True<br>
>><br>
>> which should get you the result you want.<br>
>><br>
>> Best,<br>
>><br>
>> John<br>
>><br>
>> On Jan 26, 2014, at 3:38 PM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>> wrote:<br>
>><br>
>> Sweet!  Thanks!  (I really need to update more often and see what new cool<br>
>> things I can do...)<br>
>><br>
>> Stephanie<br>
>><br>
>><br>
>> On Sun, Jan 26, 2014 at 3:34 PM, John ZuHone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>> wrote:<br>
>>><br>
>>> Hi Stephanie,<br>
>>><br>
>>> Ah yes, this is a problem I encountered just on Friday. We haven't set up<br>
>>> PhasePlot or ProfilePlot to allow you to choose what scaling the plot is in.<br>
>>><br>
>>> Since I need it too, it was already on my todo list. So I'll do it<br>
>>> tomorrow.<br>
>>><br>
>>> Best,<br>
>>><br>
>>> John<br>
>>><br>
>>> On Jan 26, 2014, at 3:32 PM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>><br>
>>> wrote:<br>
>>><br>
>>> Hi John,<br>
>>><br>
>>> Ah, okay!  Updating my yt made it work.  yt version 2.7-dev.<br>
>>><br>
>>> EXCEPT that I can't get it to plot the Density on the x-axis in log<br>
>>> space!<br>
>>><br>
>>> alld = pf.h.all_data()<br>
>>><br>
>>> tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.5",<br>
>>> "grid['z'] < 0.192","grid['z'] > -0.192","grid['cyl_RCode'] < 1.2"])<br>
>>><br>
>>> plot =<br>
>>> PhasePlot(tracerp25,"Density","z-velocity",["CellMassMsun"],weight_field=None,fontsize=30)<br>
>>> plot.set_log("Density",True)<br>
>>> plot.set_log("z-velocity",False)<br>
>>> plot.set_zlim("CellMassMsun",1e3,1e9)<br>
>>> plot.save()<br>
>>><br>
>>> Any more advice?  Thanks!<br>
>>><br>
>>> Stephanie<br>
>>><br>
>>><br>
>>> On Sun, Jan 26, 2014 at 10:44 AM, John ZuHone <<a href="mailto:jzuhone@gmail.com">jzuhone@gmail.com</a>> wrote:<br>
>>>><br>
>>>> Hi Stephanie,<br>
>>>><br>
>>>> What is your version of yt? PhasePlot is 2.6 and later.<br>
>>>><br>
>>>> Best,<br>
>>>><br>
>>>> John<br>
>>>><br>
>>>> On Jan 26, 2014, at 10:42 AM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>><br>
>>>> wrote:<br>
>>>><br>
>>>> Hi all,<br>
>>>><br>
>>>> Just as a quick update, I tried to change to using<br>
>>>><br>
>>>> plot =<br>
>>>> PhasePlot(tracerp25,"Density","z-velocity",["CellMassSolar"],weight=None)<br>
>>>> plot.save()<br>
>>>><br>
>>>> and got an error:  name 'PhasePlot' is not defined.<br>
>>>><br>
>>>> Thanks,<br>
>>>><br>
>>>> Stephanie<br>
>>>><br>
>>>><br>
>>>> On Fri, Jan 24, 2014 at 3:47 PM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>><br>
>>>> wrote:<br>
>>>>><br>
>>>>> Hi all,<br>
>>>>><br>
>>>>> I am trying to make my phase plots smaller so they can fit more nicely<br>
>>>>> into a paper.  Alternatively, I would be fine with upping the font size so<br>
>>>>> when I shrink them you can read the axes.  I found advise on how to do this<br>
>>>>> for slices, but not for phase_objects.<br>
>>>>><br>
>>>>> pc = PlotCollection(pf)<br>
>>>>><br>
>>>>> tracerp25 = alld.cut_region(["grid['specific_scalar[0]'] > 0.5",<br>
>>>>> "grid['z'] < 0.192","grid['z'] > -0.192","grid['cyl_RCode'] < 1.2"])<br>
>>>>><br>
>>>>><br>
>>>>> pc.add_phase_object(tracerp25,["Density","z-velocity","CellMassSolar"],weight=None,x_bins=50,y_bins=50,y_bounds<br>
>>>>> = [-4e7,8e7],x_bounds=[5e-28,5e-23],x_log=True,y_log=False)<br>
>>>>><br>
>>>>> Any help is much appreciated!<br>
>>>>><br>
>>>>> Thanks,<br>
>>>>><br>
>>>>> Stephanie<br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> yt-users mailing list<br>
>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>><br>
>>>><br>
>>>><br>
>>>> _______________________________________________<br>
>>>> yt-users mailing list<br>
>>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>>><br>
>>><br>
>>> _______________________________________________<br>
>>> yt-users mailing list<br>
>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>><br>
>>><br>
>>><br>
>>> _______________________________________________<br>
>>> yt-users mailing list<br>
>>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>>><br>
>><br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>><br>
>><br>
>><br>
>> _______________________________________________<br>
>> yt-users mailing list<br>
>> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
>> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
>><br>
><br>
><br>
> _______________________________________________<br>
> yt-users mailing list<br>
> <a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
> <a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
><br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org">yt-users@lists.spacepope.org</a><br>
<a href="http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org" target="_blank">http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org</a><br>
</div></div></blockquote></div><br></div>