"""
This is a simple recipe to show how to open a dataset and then plot a phase
plot showing mass distribution in the rho-T plane.
"""
from yt.mods import * # set up our namespace

fn = "RedshiftOutput0005" # parameter file to load

pf = load(fn) # load data
pc = PlotCollection(pf) # defaults to center at most dense point
pc.add_phase_sphere(10.0, "mpc", # how many of which unit at pc.center
    ["Density", "Temperature", "CellMassMsun"], # our fields: x, y, color
    weight=None) # don't take the average value in a cell, just sum them up
pc.save(fn) # save all plots
