3D Plotting

All of these plots require the usage of S2PLOT and its Python bindings. Note, also, that these require interaction with the user and do not support disconnected use. Furthermore, typically after a plot has been created the UI remains onscreen for the remainder of the Python session.

class yt.raven.VolumeRendering(data, take_log=True, window_opts='/S2MONO', cmap='rainbow', amin=0.0, amax=0.10000000000000001, bounds=None)

This is the base class for volume rendering plots. It sets up the translation information, the UI (window_opts), the cmap (S2PLOT colormap), and then using the data fed it to generate the plot. amin and amax govern the minimum and maximum alpha, and bounds is an override for the boundaries, but otherwise it uses 0..1 in all dimensions.

This class is meant to be exclusively a base class.

restart()
If control has been returned to the prompt, this will reinitiate GLUT-control.
run(pre_call=None)
Initiate the plotting, transfer control to the GLUT handler. pre_call is a function which will be called with this object as the first (and only) argument, for instance for automatically adding isosurfaces or particles.
class yt.raven.VolumeRenderingDataCube(pf, center=None, width=1, unit='1', field='Density', dims=128, smooth_data=True, **kwargs)

This is a convenience function for generating a volume rendering from an extracted subset of a static output (pf). Optionally specify the center, then given a width and a unit generate a datacube (optionally with smooth_data off) of dims on a side in field. This will then be plotted. Remaining kwargs are fed into the S2PLOT controller function.

add_vectors(vfields, dims, offsets=None)
Add vectors in vfields (list of three) of dims on a side, with the fixed list of offsets applied before plotting. Typically one would use velocity with some bulk offset, for instance.
restart()
If control has been returned to the prompt, this will reinitiate GLUT-control.
run(pre_call=None)
Initiate the plotting, transfer control to the GLUT handler. pre_call is a function which will be called with this object as the first (and only) argument, for instance for automatically adding isosurfaces or particles.
class yt.raven.VolumeRendering3DProfile(profile, field, **kwargs)

Given a 3D profile, volume render field and pass kwargs on to the plot controller.

restart()
If control has been returned to the prompt, this will reinitiate GLUT-control.
run(pre_call=None)
Initiate the plotting, transfer control to the GLUT handler. pre_call is a function which will be called with this object as the first (and only) argument, for instance for automatically adding isosurfaces or particles.
setup_plot_points()
Add all the attendant data points from the profile’s data source, toggled on and off with the space bar.
class yt.raven.HaloMassesPositionPlot(hop_results, window_opts='/S2MONO', cmap='jet')

With a HopList (hop_results), create a simple plot using their masses as color, their radii as radius, and window_opts as the options to the S2PLOT interface. cmap is a matplotlib cmap.

run(pre_call=None)
Initiate the plotting, transfer control to the GLUT handler. pre_call is a function which will be called with this object as the first (and only) argument, for instance for automatically adding isosurfaces or particles.

Previous topic

Primary Plot Interface

Next topic

yt.reason - wxPython GUI

This Page

Quick search