HexbinMark<T> Class

Draws a hexbin plot: the plot area is tiled with hexagons, and each hexagon that has points is colored by the number of its points with the color scale (a sequential scale by default). It shows the density of a scatter plot with too many points to draw each one.

public sealed class HexbinMark<T> : Mark<T>

Type parameters

T
The type of the rows.

Remarks

The hexagons are regular in pixels, so the points are binned once the scales are laid out: the domain of the color scale includes the counts, unless the scale sets its minimum and its maximum. The Mark<T>.Fill channel is not used.

Inheritance
Mark<T> HexbinMark<T>

Constructors

NameDescription
HexbinMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)Initializes a new instance of the HexbinMark<T> class.

HexbinMark(IEnumerable<T>, Func<T, object?>, Func<T, object?>)

HexbinMark.cs

Initializes a new instance of the HexbinMark<T> class.

public HexbinMark(IEnumerable<T> data, Func<T, object?> x, Func<T, object?> y)

Parameters

data IEnumerable<T>
The rows.
x Func<T, object?>
The channel of the x position.
y Func<T, object?>
The channel of the y position.

Properties

NameDescription
RadiusGets or sets the radius of the hexagons, from their center to a corner, in pixels. The default is 10.
XGets the channel of the x position.
YGets the channel of the y position.

Gets or sets the radius of the hexagons, from their center to a corner, in pixels. The default is 10.

public double Radius { get; set; }

Property value

double

Exceptions

ArgumentOutOfRangeException
The value is not a positive finite number.

Gets the channel of the x position.

public Func<T, object?> X { get; }

Property value

Func<T, object?>

Gets the channel of the y position.

public Func<T, object?> Y { get; }

Property value

Func<T, object?>