<div dir="ltr">Genius!  Yes, this did work.  I am running yt 2.7dev, so as you said, the line numbers were a bit different.  If you open a PR for this patch, when it gets accepted what gets updated?  More specifically, will it get added to *my* yt when I type yt update?  <br>
</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Jan 28, 2014 at 3:16 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">It should be working.  You're actually directly manipulating the<br>
matplotlib axes object so this has nothing to do with what has or<br>
hasn't been implemented in yt.<br>
<br>
It looks like the issue is actually due to an oversight in the<br>
implementation of PhasePlot._setup_plots().<br>
<br>
I've fixed it in my local copy by doing the following:<br>
<br>
diff -r ff7f35e02f27 yt/visualization/profile_plotter.py<br>
--- a/yt/visualization/profile_plotter.py       Mon Jan 27 11:52:18 2014 -0500<br>
+++ b/yt/visualization/profile_plotter.py       Tue Jan 28 12:13:42 2014 -0800<br>
@@ -653,6 +653,7 @@<br>
                   [ax.xaxis.label, ax.yaxis.label, cbax.yaxis.label]<br>
                 for label in labels:<br>
                     label.set_color(self._font_color)<br>
+        self._plot_valid = True<br>
<br>
     def save(self, name=None, mpl_kwargs=None):<br>
         r"""<br>
<br>
<br>
This is in yt 3.0dev, so your line numbers may be slightly different<br>
if you're running the yt 2.6.1 release.<br>
<br>
Let me know if that works for you and I'll open a PR for this patch.<br>
<span class="HOEnZb"><font color="#888888"><br>
-Nathan<br>
</font></span><div class="HOEnZb"><div class="h5"><br>
<br>
<br>
<br>
On Tue, Jan 28, 2014 at 11:55 AM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>> wrote:<br>
> Hi Nathan,<br>
><br>
> Thanks!  I am no longer getting a Key Error, but the commands are simply<br>
> being ignored.  Has this axis functionality been added to PhasePlot?<br>
><br>
><br>
><br>
><br>
> On Tue, Jan 28, 2014 at 1:00 PM, Nathan Goldbaum <<a href="mailto:nathan12343@gmail.com">nathan12343@gmail.com</a>><br>
> wrote:<br>
>><br>
>> Hi Stephanie,<br>
>><br>
>> Phase plots are keyed with the z axis name.  Try:<br>
>><br>
>> ax = plot.plots['CellMassMsun'].axes<br>
>><br>
>> -Nathan<br>
>><br>
>> On Tue, Jan 28, 2014 at 7:09 AM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>><br>
>> wrote:<br>
>> > Hi John (and all users!),<br>
>> ><br>
>> > Thanks, this definitely worked!  Now I am trying to make my axes look a<br>
>> > 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<br>
>> > to<br>
>> > use the directions from the SlicePlot example,<br>
>> ><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>
>> ><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<br>
>> >> 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>><br>
>> >> wrote:<br>
>> >><br>
>> >> Sweet!  Thanks!  (I really need to update more often and see what new<br>
>> >> 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<br>
>> >>> up<br>
>> >>> PhasePlot or ProfilePlot to allow you to choose what scaling the plot<br>
>> >>> 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>
>> >>><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>><br>
>> >>> 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>
>> >>>><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<br>
>> >>>> <<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<br>
>> >>>>> nicely<br>
>> >>>>> into a paper.  Alternatively, I would be fine with upping the font<br>
>> >>>>> size so<br>
>> >>>>> when I shrink them you can read the axes.  I found advise on how to<br>
>> >>>>> 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>
>> >>>>><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>
><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>