<div dir="ltr"><div>Thanks, Nathan!  I will take a look at this and let people know if/when I manage to specify the x and y range in PhasePlot.<br><br></div>Stephanie<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Thu, Jan 30, 2014 at 2:43 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>
Sorry to hear you're having trouble,<br>
<div class="im"><br>
On Thu, Jan 30, 2014 at 8:58 AM, Stephanie Tonnesen <<a href="mailto:stonnes@gmail.com">stonnes@gmail.com</a>> wrote:<br>
> Hi everyone!<br>
><br>
> I have a few more PhasePlots questions.<br>
> 1)  I would like to force my axes to be a particular range.  I am looking at<br>
> several times in my simulation, and the length of the stripped tail<br>
> increases, so different PhasePlots end up with different height above the<br>
> disk x-axis ranges, which makes comparison more annoying.<br>
><br>
<br>
</div>Unfortunately right now it's not possible to specify the x and y range<br>
from the ProfilePlot constructor without passing in a custom profile<br>
object.  This is something that (I think) would be relatively<br>
straightforward to add, just no one has gotten around to it.  If you'd<br>
be interested in trying, most of the logic is in<br>
$YT_HG/yt/visualization/profile_plotter.py and<br>
$YT_HG/yt/data_objects/profiles.py.<br>
<br>
Right now, the way to get custom a PhasePlot it to pass it a custom<br>
Profile3D instance.<br>
<br>
What's happening under the hood is that PhasePlot uses the<br>
create_profile function to create a Profile2D instance.  Profile2D is<br>
what's doing the hard work of creating the histogram that PhasePlot<br>
displays using matploltib. Right now create_profile doesn't accept x<br>
and y extrema either (another thing that wouldn't be hard to add, I<br>
think...), so you'll need to go a little bit lower level and create a<br>
Profile2D instance directly.<br>
<br>
Here's an example that creates a PhasePlot using a custom profile:<br>
<br>
<a href="https://hub.yt-project.org/nb/nph2ua" target="_blank">https://hub.yt-project.org/nb/nph2ua</a><br>
<div class="im"><br>
> 2)  I would like for the last tick label to be blank--to not print out on<br>
> the figure (in the attachment, I would like for '100' to not be there).<br>
><br>
<br>
</div>You can customize the tick marks by accessing the matplotlib axes<br>
object.  See this notebook for an example:<br>
<br>
<a href="http://nbviewer.ipython.org/url/hub.yt-project.org/notebooks/30321a3619b04c358198a7967d314523.ipynb" target="_blank">http://nbviewer.ipython.org/url/hub.yt-project.org/notebooks/30321a3619b04c358198a7967d314523.ipynb</a><br>

<div class="im"><br>
> 3)  On a slightly different note, I want the bin size to be bigger.  The<br>
> PhasePlots look very streaky, see attached.<br>
><br>
<br>
</div>Using a custom profile with a bigger bin size than the one yt chooses<br>
by default should help.  You can also choose the number of bins along<br>
the x and y direction using the x_bins and y_bins keyword arguments<br>
for the PhasePlot constructor.<br>
<br>
Hope that helps,<br>
<br>
Nathan<br>
<div class="im"><br>
<br>
> I will paste my current set of commands for making my PhasePlot.  Thanks for<br>
> any help!<br>
><br>
> Stephanie<br>
><br>
><br>
> plot =<br>
> PhasePlot(tracerp25,"zkpc","zvelocity8",["CellMassMsun"],weight_field=None,fontsize=19)#,x_bounds=[3e-28,5e-23],y_bounds=[-0.7,1.2])<br>
> plot.set_log("zkpc",False)<br>
> plot.set_log("zvelocity8",False)<br>
> plot.set_zlim("CellMassMsun",1e4,1e9)<br>
> plot.set_figure_size(3)<br>
><br>
> ax = plot.plots['CellMassMsun'].axes<br>
> ax.set_ylabel(r'z-velocity (10$^8$ cm/s)',fontsize=10)<br>
> ax.set_xlabel(r'Height above disk (kpc)',fontsize=10)<br>
> print r'z-velocity (10$^8$ cm/s)'<br>
> for label in ax.xaxis.get_ticklabels():<br>
>     #label.set_color('red')<br>
>     label.set_rotation(35)<br>
>     label.set_fontsize(11)<br>
> for label in ax.yaxis.get_ticklabels():<br>
>     label.set_fontsize(10)<br>
><br>
> plot.save()<br>
><br>
</div>> _______________________________________________<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>
</blockquote></div><br></div>