Add a Gaussian based on an existing colormap.
Constructing pleasing Gaussians in a transfer function can pose some
challenges, so this function will add a single Gaussian whose colors
are taken from a colormap scaled between the bounds of the transfer
function. As with TransferFunction.add_gaussian, the value is
calculated as but with the height
for each color calculated from the colormap.
Parameters : | v : float
w : float
alpha : float, optional
colormap : string, optional
|
---|
See also
Examples
>>> tf = ColorTransferFunction( (-10.0, -5.0) )
>>> tf.sample_colormap(-7.0, 0.01, 'algae')