The Uniform Heatmap Series Type
Heatmaps are provided by the
SCIFastUniformHeatmapRenderableSeries, which consumes data from a
This is designed to display 2D array of data with real values. Every item in the 2D array is represented as a colored rectangle - cell. The color depends on corresponding item’s
Uniform heatmaps are extremely fast, lightweight series types for rendering two dimensional data as a heatmap or spectrogram. As mentioned above - the
SCIFastUniformHeatmapRenderableSeries type should be used in conjunction with a
SCIUniformHeatmapDataSeries, when you simply want to specify a Step in the
X, Y direction (each cell is the same size).
Z-Values should fall into the range determined by the Minimum, Maximum values (they may go beyond it though), which are available via the following properties:
Also, Uniform Heatmap Series requires a
SCIColorMap to be set. The ColorMap determines how a gradient color transition occurs and can be applied via the
Add a Legend onto a Heatmap Chart
There is a special view designed to be used in tandem with
SCIChartHeatmapColourMap. It is not required by a Heatmap and is fully optional. It can be placed anywhere on the layout.
Similarly to the
SCIChartHeatmapColourMap type allows to set the Minimum, Maximum values and apply a ColorMap. All these can be assigned via the corresponding properties:
The numeric labels can be formatted by apply TextFormatting to them via the
Finally, there is the
SCIChartHeatmapColourMap.orientation property to specify whether the legend appears Horizontally or Vertically.
Create a Heatmap Series
To create a Uniform Heatmap Chart, use the following code:
The code above creates a Heatmap with a ColorMap that has gradient transitions between five colors and a
SCIChartHeatmapColourMap Legend to it.
NOTE: In multi axis scenarios, a series has to be assigned to particular X and Y axes. This can be done by passing the axes IDs to the
Updating Data in the Heatmap
SCIUniformHeatmapDataSeries does not support Append, Insert, Update, Remove like the other DataSeries do. You can, however, update the data by simply updating the array passed in. There are a bunch of methods provided to update Heatmap data:
-[ISCIUniformHeatmapDataSeries updateZ:atX:y:]- updates Z Value at specified xIndex and yIndex;
-[ISCIUniformHeatmapDataSeries updateZArray:]- updates all Z values for this series;
-[ISCIUniformHeatmapDataSeries updateZArray:atX:y:]- updates the range of Z values for this series;
-[ISCIUniformHeatmapDataSeries updateZValues:]- updates all Z values for this series;
-[ISCIUniformHeatmapDataSeries updateZValues:atX:y:]- updates the range of Z values for this series.
NOTE: It is highly recommended to update
ISCIValueswhich allows to omit the boxing/unboxing of values, to make sure you get the most out of performance during your updates.