yt.raven.PlotCollection.add_ortho_ray

PlotCollection.add_ortho_ray(axis, coords, field, figure=None, axes=None, field_parameters=None, plot_options=None)

Create a ray parallel to some axis, from that a line plot, and add it to the current collection.

This function will generate a yt.lagos.AMROrthoRayBase from the given parameters. This ray then gets passed to a yt.raven.LineQueryPLot, and the resultant plot is added to the current collection. Various parameters allow control of the way the line plot is displayed, as well as how the ray is generated.

Parameters :

axis : int

The axis along which to cast the ray. Can be 0, 1, or 2 for x, y, z.

coords : tuple of floats

The coordinates to place the ray at. Note that the axes are in the form of x_dict[axis] and y_dict[axis] for some axis.

field : string

The initial field to slice and display.

figure : matplotlib.figure.Figure, optional

The figure onto which the axes will be placed. Typically not used unless axes is also specified.

axes : matplotlib.axes.Axes, optional

The axes object which will be used to create the image plot. Typically used for things like multiplots and the like.

field_parameters : dict, optional

This set of parameters will be passed to the slice upon creation, which can be used for passing variables to derived fields.

plot_options : dict

These options will be given to matplotlib.axes.Axes.plot

Returns :

plot : yt.raven.LineQueryPlot

The plot that has been added to the PlotCollection.

See also

yt.lagos.AMROrthoRayBase
This is the type created by this function and passed to the plot created here.

Examples

This will cast a ray from (0.0, 0.5, 0.5) to (1.0, 0.5, 0.5) and plot it.

>>> pf = load("RD0005-mine/RedshiftOutput0005")
>>> pc = PlotCollection(pf, [0.5, 0.5, 0.5])
>>> p = pc.add_ortho_ray(0, (0.5, 0.5), "Density")

Previous topic

yt.raven.PlotCollection.add_fixed_resolution_plot

Next topic

yt.raven.PlotCollection.add_particles

This Page