Class Heatmap
- Namespace
- ScottPlot.Plottables
- Assembly
- ScottPlot.dll
public class Heatmap : IPlottable, IHasColorAxis
- Inheritance
-
Heatmap
- Implements
- Inherited Members
- Extension Methods
Constructors
Heatmap(double[,])
public Heatmap(double[,] intensities)
Parameters
intensities
double[,]
Properties
AlphaMap
If present, this array defines transparency for each cell in the heatmap. Values range from 0 (transparent) through 255 (opaque).
public byte[,]? AlphaMap { get; set; }
Property Value
- byte[,]
Axes
This object performs coordinate/pixel translation at render time based on the latest data area. It stores the axes to use for this plottable and also the data area (in pixels) updated just before each render. If this object is null it will be constructed using the default X and Y axes at render time.
public IAxes Axes { get; set; }
Property Value
CellAlignment
public Alignment CellAlignment { get; set; }
Property Value
CellHeight
Height of a single cell from the heatmap (in coordinate units)
public double CellHeight { get; set; }
Property Value
CellWidth
Width of a single cell from the heatmap (in coordinate units)
public double CellWidth { get; set; }
Property Value
Colormap
public IColormap Colormap { get; set; }
Property Value
DataRange
Range of values spanned by the data the last time it was updated
public Range DataRange { get; }
Property Value
Extent
public CoordinateRect? Extent { get; set; }
Property Value
FlipColumns
public bool FlipColumns { get; set; }
Property Value
FlipHorizontally
public bool FlipHorizontally { get; set; }
Property Value
FlipRows
public bool FlipRows { get; set; }
Property Value
FlipVertically
public bool FlipVertically { get; set; }
Property Value
Intensities
Data values for the heatmap. Update() must be called after changing this array or editing its values.
public double[,] Intensities { get; set; }
Property Value
- double[,]
IsVisible
Toggles whether this plottable is shown and contributes to the automatic axis limit detection. The calling method will check this variable (it does not need to be checked inside the Render method).
public bool IsVisible { get; set; }
Property Value
LegendItems
Items which will appear in the legend
public IEnumerable<LegendItem> LegendItems { get; }
Property Value
ManualRange
If supplied, the colormap will span this range of values
public Range? ManualRange { get; set; }
Property Value
NaNCellColor
Defines what color will be used to fill cells containing NaN.
public Color NaNCellColor { get; set; }
Property Value
Opacity
Controls the opacity of the entire heatmap from 0 (transparent) to 1 (opaque)
public double Opacity { get; set; }
Property Value
Position
If defined, the this rectangle sets the axis boundaries of heatmap data. Note that the actual heatmap area is 1 cell larger than this rectangle.
public CoordinateRect? Position { get; set; }
Property Value
Rectangle
If defined, the heatmap will be rendered within the edges of this rectangle.
public CoordinateRect? Rectangle { set; }
Property Value
Smooth
public bool Smooth { get; set; }
Property Value
Methods
~Heatmap()
protected ~Heatmap()
GetAxisLimits()
Return the 2D area (in coordinate space) occupied by the data contained in this plottable
public AxisLimits GetAxisLimits()
Returns
GetIndexes(Coordinates)
Return the position in the array beneath the given point
public (int x, int y) GetIndexes(Coordinates coordinates)
Parameters
coordinates
Coordinates
Returns
GetRange()
public Range GetRange()
Returns
GetValue(Coordinates)
Return the value of the cell beneath the given point. Returns NaN if the point is outside the heatmap area.
public double GetValue(Coordinates coordinates)
Parameters
coordinates
Coordinates
Returns
Render(RenderPack)
Draw the data from this plottable into the data area defined in the Axes. By default the surface is already clipped to the data area, but this can be cleared inside the plottable.
public virtual void Render(RenderPack rp)
Parameters
rp
RenderPack
Update()
Regenerate the image using the present settings and data in Intensities
public void Update()