vapor.transferfunction module#

class vapor.transferfunction.TransferFunction(p: ParamsBase)#

Bases: ParamsWrapper

Wraps VAPoR::MapperFunction Parent class for TransferFunction and IsoControl, supports positioning histogram over color/opacity maps as well as a set of isovalues (as with Contours)

GetMatPlotLibColorbar(axes='auto', figsize=(9, 1.5), **kwargs)#

Shows a colorbar for Vapor’s transfer function using pylab.colorbar. This function takes the same kwargs as pylab.colorbar and those parameters are passed onto the matplotlib function.

GetMatPlotLibColormap()#
GetMaxMapValue#

float VAPoR::MapperFunction::getMaxMapValue() Obtain maximum mapping (histo) value

GetMinMapValue#

float VAPoR::MapperFunction::getMinMapValue() Obtain minimum mapping (histo) value

GetMinMaxMapValue#

vector<double> VAPoR::MapperFunction::getMinMaxMapValue() Obtain min and max mapping (histo) values

GetOpacityScale#

double VAPoR::MapperFunction::getOpacityScale() Identify the current opacity scale factor

classmethod ListBuiltinColormaps() list[str]#
LoadBuiltinColormap(name: str) None#

See ListBuiltinColormaps

LoadColormapFromFile#

int VAPoR::MapperFunction::LoadColormapFromFile(string path)

LoadFromFile#
int VAPoR::MapperFunction::LoadFromFile(string path)

Load a transfer function from a file,

Parameters

path Path of input file

SetColorHSVControlPoints(cp: list[tuple[float, tuple[float, float, float]]])#

Sets opacities for x,y values where MinMapValue<=x<=MaxMapValue and 0<=y<=1 Warning: The points are stored as normalized coordinates so if the MapValue range changes it will not be reflected in the mapping range

SetColorHSVList(colors: list[tuple[float, float, float]])#

Sets colormap as equally spaced control points

SetColorNormalizedHSVControlPoints(cp: list[tuple[float, tuple[float, float, float]]])#

Sets colormap for normalized data values

SetColorNormalizedRGBControlPoints(cp: list[tuple[float, tuple[float, float, float]]])#

Sets colormap for normalized data values

SetColorRGBControlPoints(cp: list[tuple[float, tuple[float, float, float]]])#

Sets opacities for x,y values where MinMapValue<=x<=MaxMapValue and 0<=y<=1 Warning: The points are stored as normalized coordinates so if the MapValue range changes it will not be reflected in the mapping range

SetColorRGBList(colors: list[tuple[float, float, float]])#

Sets colormap as equally spaced control points

SetMaxMapValue#

void VAPoR::MapperFunction::setMaxMapValue(float val)

SetMinMapValue#

void VAPoR::MapperFunction::setMinMapValue(float val)

SetOpacityControlPoints(cp: list[tuple[float, float]])#

Sets opacities for x,y values where MinMapValue<=x<=MaxMapValue and 0<=y<=1 Warning: The points are stored as normalized coordinates so if the MapValue range changes it will not be reflected in the mapping range

SetOpacityList(opacities: list[float])#

Sets opacities as equally spaced control points

SetOpacityNormalizedControlPoints(cp: list[tuple[float, float]])#

Sets opacities for normalized x,y values

SetOpacityScale#
void VAPoR::MapperFunction::setOpacityScale(double val)

Specify an opacity scale factor applied to all opacity maps

Parameters

val opacity scale factor

ShowMatPlotLibColorbar(axes='auto', figsize=(9, 1.5), **kwargs)#

Shows a colorbar for Vapor’s transfer function using pylab.colorbar. This function takes the same kwargs as pylab.colorbar and those parameters are passed onto the matplotlib function.