"""
This is a simple recipe to show how to open a dataset, plot a slice
through it, and add some extra vectors on top.  Here we've used the imaginary
fields ``magnetic_field_x``, ``magnetic_field_y`` and ``magnetic_field_z``.
"""
from yt.mods import * # set up our namespace

fn = "RedshiftOutput0005" # parameter file to load
ax = 0 # x-axis

pf = load(fn) # load data
pc = PlotCollection(pf) # defaults to center at most dense point
p = pc.add_slice("Density", ax) 
v1 = "magnetic_field_%s" % (axis_names[x_dict[ax]])
v2 = "magnetic_field_%s" % (axis_names[y_dict[ax]])
p.modify["quiver"](v1, v2) # This takes a few arguments, but we'll use the defaults
                           # here.  You can control the 'skip' factor in the
                           # vectors.
pc.set_width(2.5, 'mpc') # change width of all plots in pc
pc.save(fn) # save all plots
