ILNumerics - Technical Application Development
SystemObject
ILNumerics.Drawing.PlottingStaticColormapProvider
Assembly: ILNumerics.Drawing (in ILNumerics.Drawing.dll) Version: ILNumerics Ultimate VS 4
Top
Top
Top
Use this class in order to provide colormap information to colorbars at runtime. This is useful in a setup where colorbars are
to be used in conjunction with custom objects (and not with predefined plot objects like surface or contour plots).
This class is used to provide static colormap data to colorbars.
[ILNumerics Visualization Engine]
Inheritance Hierarchy
ILNumerics.Drawing.PlottingStaticColormapProvider
Namespace: ILNumerics.Drawing.Plotting
Assembly: ILNumerics.Drawing (in ILNumerics.Drawing.dll) Version: ILNumerics Ultimate VS 4
Syntax
The StaticColormapProvider type exposes the following members.
Constructors
Name | Description | |
---|---|---|
StaticColormapProvider |
Create new static colormap provider for supporting colorbars for custom objects
[ILNumerics Visualization Engine] |
Properties
Name | Description | |
---|---|---|
Colormap |
Colormap used for mapping values to colors
[ILNumerics Visualization Engine] | |
ID |
ID of this provider (always 0)
[ILNumerics Visualization Engine] | |
IsColormapped |
Always returns true
[ILNumerics Visualization Engine] | |
Tag |
Always returns a constant tag: "StaticColormapProvider"
[ILNumerics Visualization Engine] |
Methods
Name | Description | |
---|---|---|
GetRangeMaxValue |
Provides the upper range for colorbar limits
[ILNumerics Visualization Engine] | |
GetRangeMinValue |
Provides the lower range for colorbar limits
[ILNumerics Visualization Engine] | |
ScaleMode |
Provides the needed scale mode for the colorbar axis
[ILNumerics Visualization Engine] |
Remarks
StaticColormapProvider is given to ColormapProvider and used at runtime by the colorbar to retrieve the needed information.
[ILNumerics Visualization Engine]
Examples
We need to provide colormap data to the colorbar at runtime. // We simply take a static colormap provider here: var cmProv = new StaticColormapProvider(Colormaps.ILNumerics, 0, 1); // Position data for plotting Array<float> A = tosingle(rand(3, 1000)); // create the points ilPanel1.Scene.Add( new PlotCube(twoDMode: false) { new Points("myPoints") { Positions = A, // since we want to show a colorbar, we need to put the points colors under colormap control Colors = cmProv.Colormap.Map(A["1;:"]).T, // deactivate single color rendering Color = null }, // add the colorbar (somewhere) and give it the colormap provider new Colorbar() { ColormapProvider = cmProv } });
See Also