yt.visualization.volume_rendering.transfer_functions.ColorTransferFunction

class yt.visualization.volume_rendering.transfer_functions.ColorTransferFunction(x_bounds, nbins=256, grey_opacity=False)[source]

A complete set of transfer functions for standard color-mapping.

This is the best and easiest way to set up volume rendering. It creates field tables for all three colors, their alphas, and has support for sampling color maps and adding independent color values at all locations. It will correctly set up the MultiVariateTransferFunction.

Parameters:

x_bounds : tuple of floats

The min and max for the transfer function. Values below or above these values are discarded.

nbins : int

How many bins to calculate; in betwee, linear interpolation is used, so low values are typically fine.

grey_opacity : bool

Should opacity be calculated on a channel-by-channel basis, or overall? Useful for opaque renderings.

Methods