RidgelineMark<T> Class
Draws a ridgeline plot (a joy plot): the probability density of the x values of each category of y, estimated with a Gaussian kernel, as an area that rises from the position of the category. The areas overlap the categories above them: the tallest one is RidgelineMark<T>.Overlap times the space between two categories, and the others are scaled with it, so their heights compare. The categories are drawn from the top down, each one in front of the previous one.
public sealed class RidgelineMark<T> : Mark<T>Type parameters
T- The type of the rows.
Remarks
Unless the plot sets its y scale, the y scale is a point scale that leaves room for the tallest area above the first category.
- Inheritance
Mark<T>RidgelineMark<T>
Constructors
| Name | Description |
|---|---|
| RidgelineMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>) | Initializes a new instance of the RidgelineMark<T> class. |
RidgelineMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)
RidgelineMark.csInitializes a new instance of the RidgelineMark<T> class.
public RidgelineMark(IEnumerable<T> data, Func<T, object?> x, Func<T, object?> y)Parameters
dataIEnumerable<T>- The rows: the values of all the categories.
xFunc<T, object?>- The channel of the value.
yFunc<T, object?>- The channel of the category.
Properties
| Name | Description |
|---|---|
| Bandwidth | Gets or sets the bandwidth of the kernel, in the unit of x, or null for Silverman's rule of thumb, per category. |
| Curve | Gets or sets how the points of the curves are joined. The default is Curve.MonotoneX. |
| Cut | Gets or sets how far the curves go beyond the smallest and the largest values of their category, in bandwidths. The default is 3, where the density is almost zero. |
| FillOpacity | Gets or sets the opacity of the fill, from 0 to 1. The default is 1. |
| Overlap | Gets or sets the height of the tallest area, as a multiple of the space between two categories. The default is 1.5. |
| Samples | Gets or sets the number of points of each curve. The default is 100. |
| X | Gets the channel of the value. |
| Y | Gets the channel of the category. |
Bandwidth
RidgelineMark.csCurve
RidgelineMark.csGets or sets how the points of the curves are joined. The default is Curve.MonotoneX.
public Curve Curve { get; set; }Property value
FillOpacity
RidgelineMark.csOverlap
RidgelineMark.csGets or sets the height of the tallest area, as a multiple of the space between two categories. The default is 1.5.
public double Overlap { get; set; }Samples
RidgelineMark.csGets or sets the number of points of each curve. The default is 100.
public int Samples { get; set; }