ContourMark<T> Class
Draws the density contours of points: the two-dimensional density of the points, estimated with a Gaussian kernel on a grid, is cut at round thresholds with marching squares, and the region above each threshold is filled (or outlined) with the color of the threshold, mapped by the color scale (a sequential scale by default).
public sealed class ContourMark<T> : Mark<T>Type parameters
T- The type of the rows.
Remarks
The Mark<T>.Fill channel is not used: the thresholds give the colors.
- Inheritance
Mark<T>ContourMark<T>
Constructors
| Name | Description |
|---|---|
| ContourMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>) | Initializes a new instance of the ContourMark<T> class. |
ContourMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)
ContourMark.csInitializes a new instance of the ContourMark<T> class.
public ContourMark(IEnumerable<T> data, Func<T, object?> x, Func<T, object?> y)Parameters
dataIEnumerable<T>- The rows.
xFunc<T, object?>- The channel of the x position.
yFunc<T, object?>- The channel of the y position.
Properties
| Name | Description |
|---|---|
| BandwidthX | Gets or sets the bandwidth of the kernel along x, in the unit of x, or null for Silverman's rule of thumb. |
| BandwidthY | Gets or sets the bandwidth of the kernel along y, in the unit of y, or null for Silverman's rule of thumb. |
| FillOpacity | Gets or sets the opacity of the fill, from 0 to 1. The default is 1. |
| Filled | Gets or sets a value that indicates whether the regions are filled; otherwise their outlines are drawn. The default is true. |
| GridSize | Gets or sets the number of points of the grid of the density along each axis. The default is 64. |
| Thresholds | Gets or sets the approximate number of thresholds: the contours are at round values of the density. The default is 10. |
| X | Gets the channel of the x position. |
| Y | Gets the channel of the y position. |
BandwidthX
ContourMark.csBandwidthY
ContourMark.csFillOpacity
ContourMark.csFilled
ContourMark.csGridSize
ContourMark.csGets or sets the number of points of the grid of the density along each axis. The default is 64.
public int GridSize { get; set; }Thresholds
ContourMark.csGets or sets the approximate number of thresholds: the contours are at round values of the density. The default is 10.
public int Thresholds { get; set; }