yt.raven.PlotCollectionInteractive.add_fixed_resolution_plot

PlotCollectionInteractive.add_fixed_resolution_plot(*args, **kwargs)

Create a fixed resolution image from an existing buffer.

This accepts a FixedResolutionBuffer and will make a plot from that buffer.

Parameters :

frb : yt.raven.FixedResolutionBuffer

The buffer from which fields will be pulled.

field : string

The initial field to display.

use_colorbar : bool, optional

Whether we should leave room for and create a colorbar.

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.

fig_size : tuple of floats

This parameter can act as a proxy for the manual creation of a figure. By specifying it, you can create plots with an arbitrarily large or small size. It is in inches, defaulting to 100 dpi.

Returns :

plot : yt.raven.FixedResolutionPlot

The plot that has been added to the PlotCollection.

See also

yt.extensions.image_writer.write_image
A faster, colorbarless way to write out FRBs.

Examples

Here’s a simple mechanism for getting the angular momentum of a collapsing cloud and generating a cutting plane aligned with the angular momentum vector.

>>> pf = load("RD0005-mine/RedshiftOutput0005")
>>> proj = pf.h.proj(0, "Density")
>>> frb = FixedResolutionBuffer(proj, (0.2, 0.3, 0.4, 0.5), (512, 512))
>>> p = pc.add_fixed_resolution_plot(frb, "Density")

This Page