ILNumerics Ultimate VS

StaticColormapProvider Class

ILNumerics Ultimate VS Documentation
ILNumerics - Technical Application Development
This class is used to provide static colormap data to colorbars.

[ILNumerics Visualization Engine]

Inheritance Hierarchy

SystemObject
  ILNumerics.Drawing.PlottingStaticColormapProvider

Namespace:  ILNumerics.Drawing.Plotting
Assembly:  ILNumerics.Drawing (in ILNumerics.Drawing.dll) Version: ILNumerics Ultimate VS 4
Syntax

public class StaticColormapProvider : IColormapProvider, 
	IAxisDataProvider

The StaticColormapProvider type exposes the following members.

Constructors

  NameDescription
Public methodStaticColormapProvider
Create new static colormap provider for supporting colorbars for custom objects

[ILNumerics Visualization Engine]

Top
Properties

  NameDescription
Public propertyColormap
Colormap used for mapping values to colors

[ILNumerics Visualization Engine]

Public propertyID
ID of this provider (always 0)

[ILNumerics Visualization Engine]

Public propertyIsColormapped
Always returns true

[ILNumerics Visualization Engine]

Public propertyTag
Always returns a constant tag: "StaticColormapProvider"

[ILNumerics Visualization Engine]

Top
Methods

  NameDescription
Public methodGetRangeMaxValue
Provides the upper range for colorbar limits

[ILNumerics Visualization Engine]

Public methodGetRangeMinValue
Provides the lower range for colorbar limits

[ILNumerics Visualization Engine]

Public methodScaleMode
Provides the needed scale mode for the colorbar axis

[ILNumerics Visualization Engine]

Top
Remarks

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).

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

Reference