ViolinMark<T> Class
Draws a violin plot per category of x: the probability density of the y values, mirrored on both sides of the middle of the band, from the smallest value to the largest. A thin box from the first to the third quartile and a dot at the median are drawn inside, unless ViolinMark<T>.ShowBox is off. The widths of the violins are proportional to their densities: the widest point of all the violins fills ViolinMark<T>.ViolinWidth of the band.
public sealed class ViolinMark<T> : Mark<T>Type parameters
T- The type of the rows.
- Inheritance
Mark<T>ViolinMark<T>
Constructors
| Name | Description |
|---|---|
| ViolinMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>) | Initializes a new instance of the ViolinMark<T> class. |
ViolinMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)
ViolinMark.csInitializes a new instance of the ViolinMark<T> class.
public ViolinMark(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 category.
yFunc<T, object?>- The channel of the value.
Properties
| Name | Description |
|---|---|
| Bandwidth | Gets or sets the bandwidth of the kernel, in the unit of y, or null for Silverman's rule of thumb, per category. |
| Samples | Gets or sets the number of points of each side of a violin. The default is 64. |
| ShowBox | Gets or sets a value that indicates whether the quartiles and the median are drawn inside the violins. The default is true. |
| ViolinWidth | Gets or sets the width of the widest violin, as a fraction of the band. The default is 0.9. |
| X | Gets the channel of the category. |
| Y | Gets the channel of the value. |
Bandwidth
ViolinMark.csSamples
ViolinMark.csGets or sets the number of points of each side of a violin. The default is 64.
public int Samples { get; set; }