yt.raven.PlotCollection

class yt.raven.PlotCollection(pf, center=None)

The primary interface for creating plots.

The PlotCollection object was created to ease the creation of multiple slices, projections and so forth made from a single parameter file. The concept is that when the width on one image changes, it should change on all the others. The PlotCollection can create all plot types available in yt.

Parameters :

pf : StaticOutput

The parameter file from which all the plots will be created.

center : array_like, optional

The ‘center’ supplied to plots like sphere plots, slices, and so on. Should be 3 elements. Defaults to the point of maximum density.

Long_variable_name : {‘hi’, ‘ho’}, optional

Choices in brackets, default first when optional.

Notes

This class is the primary entry point to creating plots, but it is not the only entry point. Additionally, creating a PlotCollection should be a “cheap” operation.

You may iterate over the plots in the PlotCollection, via something like:

>>> pc = PlotCollection(pf)
>>> for p in pc: print p

Examples

>>> pc = PlotCollection(pf, center=[0.5, 0.5, 0.5])
>>> pc.add_slice("Density", 0)
>>> pc.save()

Methods

add_cutting_plane(field, normal[, center, ...]) Create a cutting plane, from that a plot, and add it to the current collection.
add_fixed_res_cutting_plane(field, normal, width) Create a fixed resolution cutting plane, from that a plot, and add it to the current collection.
add_fixed_resolution_plot(frb, field[, ...]) Create a fixed resolution image from an existing buffer.
add_ortho_ray(axis, coords, field[, figure, ...]) Create a ray parallel to some axis, from that a line plot, and add it to the current collection.
add_particles(axis, width[, p_size, col, ...]) Create a plot of a thick slab of particles.
add_phase_object(data_source, fields[, ...]) From an existing object, create a 2D, binned profile.
add_phase_sphere(radius, unit, fields[, ...]) From a description of a sphere, create a 2D, binned profile.
add_profile_object(data_source, fields[, ...]) From an existing object, create a 1D, binned profile.
add_profile_sphere(radius, unit, fields[, ...]) From a description of a sphere, create a 1D, binned profile.
add_projection(field, axis[, weight_field, ...]) Create a projection, from that a projection plot, and add it to the current collection.
add_ray(start_point, end_point, field[, ...]) Create a ray between two points, from that a line plot, and add it to the current collection.
add_scatter_source(data_source, fields[, ...]) Given a data source, make a scatter plot from that data source.
add_slice(field, axis[, coord, center, ...]) Create a slice, from that a slice plot, and add it to the current collection.
autoscale() Turn on autoscaling on all plots.
save([basename, format, override, force_save]) Save out all the plots hanging off this plot collection, using generated names.
save_book(filename[, author, title, ...]) Save a multipage PDF of all the current plots, rather than
set_cmap(cmap) Change the colormap of all plots.
set_lim(lim) Set the x- and y-limits of all plots.
set_width(width, unit) Change the width of all image plots.
set_xlim(xmin, xmax) Set the x-limits of all plots.
set_ylim(ymin, ymax) Set the y-limits of all plots.
set_zlim(zmin, zmax, *args, **kwargs) Set the limits of the colorbar.
switch_field(field) Change the displayed of all image plots.
switch_z(field) Change the displayed of all image plots.

Previous topic

yt.raven.AnnuliProfiler.sum

Next topic

yt.raven.PlotCollection.add_cutting_plane

This Page