Table of Contents

Class IColormapExtensions

Namespace
ScottPlot
Assembly
ScottPlot.dll
public static class IColormapExtensions
Inheritance
IColormapExtensions
Inherited Members

Methods

GetColor(IColormap, double, Range)

public static Color GetColor(this IColormap cmap, double position, Range range)

Parameters

cmap IColormap
position double
range Range

Returns

Color

GetColor(IColormap, int, int, double, double)

Return the color for an item at index index of a collection of size count. The startFraction and endFraction may be customized to restrict sampling to a portion of the colormap.

public static Color GetColor(this IColormap cmap, int index, int count, double startFraction = 0, double endFraction = 1)

Parameters

cmap IColormap
index int
count int
startFraction double
endFraction double

Returns

Color

GetColors(IColormap, int, double, double)

Returns an array of colors evenly spaced along the colormap

public static Color[] GetColors(this IColormap colormap, int count, double minFraction = 0, double maxFraction = 1)

Parameters

colormap IColormap
count int

The number of colors to get from the colormap.

minFraction double

The starting fraction in the colormap range from which to begin extracting colors (normalized to [0, 1]).

maxFraction double

The ending fraction in the colormap range at which to stop extracting colors (normalized to [0, 1]).

Returns

Color[]

GetImage(IColormap, int, int)

public static Image GetImage(this IColormap colormap, int height = 1, int width = 256)

Parameters

colormap IColormap
height int
width int

Returns

Image

GetSKBitmap(IColormap, bool)

Create a 1 by 256 bitmap displaying all values of a heatmap

public static SKBitmap GetSKBitmap(this IColormap colormap, bool vertical)

Parameters

colormap IColormap
vertical bool

Returns

SKBitmap

Reversed(IColormap)

public static IColormap Reversed(this IColormap cmap)

Parameters

cmap IColormap

Returns

IColormap