Hi there!

You can get it by accessing the .x attribute for the bins and then the dict-like access on the profile for the actual y values.  For instance:

import yt
ds = yt.load_sample("IsolatedGalaxy")
p = ds.r[:].profile("density", "temperature", weight_field="mass")

now you can get p.x and p["temperature"].  Or, if you have a phase plot:

p = ds.r[:].profile(["density", "temperature"], "mass", weight_field=None)

You can access p.x, p.y, and p["mass"].

-Matt

On Fri, May 24, 2024 at 11:42 PM <hyf@stu.pku.edu.cn> wrote:
Hi, all,

I am trying to use matlibplot to plot the profile of a sphere object, so I need to get the np.array of profile plots.

I know that we can use "slc.frb" to get the np.array of SlicePlot.

However, I don't find the simliar function in profile plots, how can I get the np.array of a sphere object's profile?

Thanks a lot for every suggestion or help.

best wishes,
Yifeng He
_______________________________________________
yt-users mailing list -- yt-users@python.org
To unsubscribe send an email to yt-users-leave@python.org
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: matthewturk@gmail.com