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
Returns
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
Returns
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
IColormapcount
intThe number of colors to get from the colormap.
minFraction
doubleThe starting fraction in the colormap range from which to begin extracting colors (normalized to [0, 1]).
maxFraction
doubleThe 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
Returns
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
Returns
Reversed(IColormap)
public static IColormap Reversed(this IColormap cmap)
Parameters
cmap
IColormap