ColorTransferFunction.
add_layers
(N, w=None, mi=None, ma=None, alpha=None, colormap='gist_stern', col_bounds=None)[source]¶Add a set of Gaussians based on an existing colormap.
Constructing pleasing Gaussians in a transfer function can pose some challenges, so this function will add several evenly-spaced Gaussians whose colors are taken from a colormap scaled between the bounds of the transfer function. For each Gaussian to be added, ColorTransferFunction.sample_colormap is called.
Parameters: | N : int
w : float
mi : float, optional
ma : float, optional
alpha : list of floats, optional
colormap : string, optional
col_bounds: array_like [min, max], optional :
|
---|
See also
ColorTransferFunction.sample_colormap
Examples
>>> tf = ColorTransferFunction( (-10.0, -5.0) )
>>> tf.add_layers(8)