<div dir="ltr">Forgot to mention that there's a bug related to how PhasePlot uses display_name in 2.6.  I've fixed it in this pull request, which I expect to be accepted quickly:<div><br></div><div><a href="https://bitbucket.org/yt_analysis/yt/pull-request/873/fixing-an-issue-with-phaseplot-ignoring/diff">https://bitbucket.org/yt_analysis/yt/pull-request/873/fixing-an-issue-with-phaseplot-ignoring/diff</a></div>

</div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sat, May 3, 2014 at 9:31 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"><div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote"><div class="">On Sat, May 3, 2014 at 8:53 PM, Jeremy Ritter <span dir="ltr"><<a href="mailto:jritter@astro.as.utexas.edu" target="_blank">jritter@astro.as.utexas.edu</a>></span> wrote:<br>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">Hello,<br>
<br>
I'm relatively new to YT. Creating great looking plots seems to be really easy, but setting axis labels and other text labels (timestamps) has proven to be quite challenging. I'm creating some phase plots with the latest stable version (2.6 I think), and I would like for variables to have proper names, e.g. "Number Density" instead of "NumberDensity".<br>



<br>
I first tried changing the labels using the axes object set_xlabel/set_ylabel methods, but that removes the units and doesn't accept latex style commands for making my own units. It also appears to change the font style.<br>



<br>
Then I tried creating derived fields with the proper names including spaces, but it seems that the labels get squished, having all spaces removed when it prints the label. Filename output still has the spaces in the variable name. </blockquote>


<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">
<br>
What is the easiest way to set publication quality axis labels with units in v2.6?<br></blockquote><div><br></div></div><div>Hi Jeremy,</div><div><br></div><div>This is cleaner in the upcoming 3.0 release, where we've rethought how fields, units, and plot labels work.</div>


<div><br></div><div>In 2.6 you should be able to get what you want by supplying a custom `display_name` when you call `add_field`.  See this page for more details on keyword arguments accepted by add_field:</div><div><br>


</div><div><a href="http://yt-project.org/docs/dev/analyzing/creating_derived_fields.html#field-options" target="_blank">http://yt-project.org/docs/dev/analyzing/creating_derived_fields.html#field-options</a><br></div><div class="">

<div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">

<br>
My other problem seems to be that I'm unable to use any of the annotation callbacks with a phase plot. Is this true? I just want to add a timestamp, for which I've already created the string, e.g. "5.35 Myr".<br>



<br></blockquote><div><br></div></div><div>This wouldn't be too hard to add, but no one has done it yet.  We'd love pull requests to enable plot callbacks for phase plots, which should be relatively straightforward.  Plot callbacks for ProfilePlot would be harder (since it shares less code with PlotWindow) but doable probably.</div>


<div><br></div><div>For now take a look at this example, which addresses both the points you bring up:</div><div><br></div><div><a href="http://nbviewer.ipython.org/gist/ngoldbaum/11510747" target="_blank">http://nbviewer.ipython.org/gist/ngoldbaum/11510747</a><span class="HOEnZb"><font color="#888888"><br>


</font></span></div><span class="HOEnZb"><font color="#888888"><div> </div><div>-Nathan</div></font></span><div class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex">


Thanks!<br>
-Jeremy<br>
_______________________________________________<br>
yt-users mailing list<br>
<a href="mailto:yt-users@lists.spacepope.org" target="_blank">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>
</blockquote></div></div><br></div></div>
</blockquote></div><br></div>