Hi Mateusz,

Below is a reasonably simple way that someone might do something like this.  This makes use of some newer functionality that currently only exists in the development branch, so you would have to update to that to use it.  This results in the following plot:

To do this, I first made some profiles over a time-series of datasets with the following script:

The last line is the new functionality, which saves all of the compiled profile data in a way that it can be reloaded as a yt dataset.  You can see more information about that here:

Now, yt is awfully close to being able to plot this itself, but not quite there yet, so I plotted this using matplotlib.  The plotting script is here:

At the top of that script, you can see how I get access to the data that was saved by the first script.  All that needs to be done is to call yt.load with the file that was created and the data fields are all accessible with full unit support through ds.data.  So, for example, ds.data["density"].

I hope this is helpful.


On Sat, Feb 27, 2016 at 2:44 AM, Nathan Goldbaum <nathan12343@gmail.com> wrote:
While I think this is a really cool idea, I don't think this is possible within yt right now. Britton Smith might know a trick to do this though...

On Fri, Feb 26, 2016 at 3:59 PM, Mateusz Ruszkowski <mateuszr@umich.edu> wrote:


Is there a simple way in yt to generate a "phase plot" of the gas density, with time and radius on the axes, using a time series of data files?


yt-users mailing list

yt-users mailing list