Hi Daniel,

There are a couple ways to do this, but the first thing to check -- do you
want the data from the simulation, or do you want it from the output
image?  For instance, with a slice these two things are basically the
same.  But for a projection, they'll be different, as the projection is the
integration along a sight line.

To query along a line, you can either use a data object like ds.ray , which
accepts a 3D starting point and ending point, and accessing those values,
or you can try using matplotlib's built-in methods for accessing it.  You
can also access the data buffer by accessing the slice plot's sub-objects.
This is described a bit in this document:
https://yt-project.org/doc/visualizing/manual_plotting.html

There are also methods to export to, for instance, ds9 and glue which you
can access on the underlying data_source object.

I hope that helps -- and if not, let us know!

-Matt

On Tue, Mar 12, 2024 at 9:32 PM Daniel Ruvalcaba <[email protected]>
wrote:

> Hello I am a new user to yt and am also new to python as a coding
> language. I do have past coding experiences but that is not important. I
> have been making graphs based on the files given on yt_data and am now
> trying to see if I can grab specific data from points within the graph. I
> saw that yt can do that with a sphere and its radius but I would like to
> see if there was a way to do the same with projection plots (other graphs
> as well). Specifically what I want to ask is if I can grab data from a
> graph at specific points within it or if I can draw a line within the graph
> and grab the data from those lines, and how I would be able to do that. I
> would be really grateful if someone could help, but if not it is okay.
>
> Thank you,
> Daniel56
> _______________________________________________
> yt-users mailing list -- [email protected]
> To unsubscribe send an email to [email protected]
> https://mail.python.org/mailman3/lists/yt-users.python.org/
> Member address: [email protected]
>
_______________________________________________
yt-users mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/yt-users.python.org/
Member address: [email protected]

Reply via email to