Question about 2D phase plot limits
Hi folks, I'm using yt 2.6 (well, the most up-to-date version of yt 2.x), and am attempting to manually set the limits on a 2D phase plot. Unfortunately, I can't find anything in the docs, and the one IPython notebook solution linked to is defunct. So, if I want to manually set the x and y limits on a plot generated using PhasePlot - i.e., with the command: phase = PhasePlot(ad, "Baryon_Overdensity", "Temperature", "CellMassMsun", weight_field=None, fractional=True) What is the best way to do this? Thanks! --Brian
Hi Brian, Looks to me like the best way to do this is in 2.x is to construct the PhasePlot you want using create_profile( ... ), and then use PhasePlot.from_profiles to make it into a phase plot. -Matt On Mon, Aug 18, 2014 at 10:00 AM, Brian O'Shea <bwoshea@gmail.com> wrote:
Hi folks,
I'm using yt 2.6 (well, the most up-to-date version of yt 2.x), and am attempting to manually set the limits on a 2D phase plot. Unfortunately, I can't find anything in the docs, and the one IPython notebook solution linked to is defunct. So, if I want to manually set the x and y limits on a plot generated using PhasePlot - i.e., with the command:
phase = PhasePlot(ad, "Baryon_Overdensity", "Temperature", "CellMassMsun", weight_field=None, fractional=True)
What is the best way to do this?
Thanks!
--Brian
_______________________________________________ yt-users mailing list yt-users@lists.spacepope.org http://lists.spacepope.org/listinfo.cgi/yt-users-spacepope.org
Hi Matt, Ah, gotcha - thanks! I also spoke to Hilary on #yt, which was helpful. So, to clarify, is the appropriate thing to do in this case, then, to create a profile by: profile = create_profile(ad,bin_fields=["Baryon_Overdensity","Temperature"],n=[256,256],fields=["CellMassMsun"]) edit the profile.x and profile.y arrays directly so that they have the limits I want, by say: profile.x = np.logspace(-1,5,256) (and similarly for y), and then pass it into PhasePlot? --Brian On Mon, Aug 18, 2014 at 11:04 AM, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Brian,
Looks to me like the best way to do this is in 2.x is to construct the PhasePlot you want using create_profile( ... ), and then use PhasePlot.from_profiles to make it into a phase plot.
-Matt
On Mon, Aug 18, 2014 at 10:00 AM, Brian O'Shea <bwoshea@gmail.com> wrote:
Hi folks,
I'm using yt 2.6 (well, the most up-to-date version of yt 2.x), and am attempting to manually set the limits on a 2D phase plot. Unfortunately, I can't find anything in the docs, and the one IPython notebook solution linked to is defunct. So, if I want to manually set the x and y limits on a plot generated using PhasePlot - i.e., with the command:
phase = PhasePlot(ad, "Baryon_Overdensity", "Temperature", "CellMassMsun", weight_field=None, fractional=True)
What is the best way to do this?
Thanks!
--Brian
_______________________________________________ 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
On Mon, Aug 18, 2014 at 11:04 AM, Brian O'Shea <bwoshea@gmail.com> wrote:
Hi Matt,
Ah, gotcha - thanks! I also spoke to Hilary on #yt, which was helpful. So, to clarify, is the appropriate thing to do in this case, then, to create a profile by:
profile = create_profile(ad,bin_fields=["Baryon_Overdensity","Temperature"],n=[256,256],fields=["CellMassMsun"])
edit the profile.x and profile.y arrays directly so that they have the limits I want, by say:
profile.x = np.logspace(-1,5,256)
(and similarly for y),
and then pass it into PhasePlot?
...no, that actually might provide the wrong results. Looks like I was wrong about 2.X's create_profile; the extrema args aren't in 2.x, only 3.x. It's just shorthand anyway for calling Profile2D. So, you can create Profile2D and supply it through from_profiles. -Matt
--Brian
On Mon, Aug 18, 2014 at 11:04 AM, Matthew Turk <matthewturk@gmail.com> wrote:
Hi Brian,
Looks to me like the best way to do this is in 2.x is to construct the PhasePlot you want using create_profile( ... ), and then use PhasePlot.from_profiles to make it into a phase plot.
-Matt
On Mon, Aug 18, 2014 at 10:00 AM, Brian O'Shea <bwoshea@gmail.com> wrote:
Hi folks,
I'm using yt 2.6 (well, the most up-to-date version of yt 2.x), and am attempting to manually set the limits on a 2D phase plot. Unfortunately, I can't find anything in the docs, and the one IPython notebook solution linked to is defunct. So, if I want to manually set the x and y limits on a plot generated using PhasePlot - i.e., with the command:
phase = PhasePlot(ad, "Baryon_Overdensity", "Temperature", "CellMassMsun", weight_field=None, fractional=True)
What is the best way to do this?
Thanks!
--Brian
_______________________________________________ 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
participants (2)
-
Brian O'Shea
-
Matthew Turk