"""
This is a simple recipe to show how to open a dataset and then take a
weighted-average projection through it, centered at its most dense point.  For
more information see :ref:`methods-projections`.
"""
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_projection("Density", 0, weight_field="Density") # 0 = x-axis
pc.add_projection("Density", 1, weight_field="Density") # 1 = y-axis
pc.add_projection("Density", 2, weight_field="Density") # 2 = z-axis
pc.set_width(1.5, 'mpc') # change width of all plots in pc
pc.save(fn) # save all plots
