Type Alias: Histogram2dTrace
ts
type Histogram2dTrace = CommonTraceAttributes & CartesianTraceAttributes & object;2D histogram: samples binned along x and y, counted (or aggregated) per cell and drawn as a heatmap.
Type Declaration
| Name | Type | Description |
|---|---|---|
autobinx? | boolean | Obsolete (Plotly compatibility): bins are automatic unless xbins sets them. |
autobiny? | boolean | Obsolete (Plotly compatibility): bins are automatic unless ybins sets them. |
autocolorscale? | boolean | Pick the colorscale from the sign of the color domain (layout.colorscale.sequential, sequentialminus or diverging) instead of colorscale. |
bingroup? | string | Default of xbingroup and ybingroup (suffixed per direction): traces with the same bingroup get matching x bins and matching y bins. |
coloraxis? | "coloraxis" | `coloraxis${number}` | Share a colorscale and domain with other traces through layout.coloraxis ('coloraxis', 'coloraxis2', …). Overrides this trace's colorscale attributes. |
colorbar? | Colorbar | The colorbar of this colorscale (plan E5.3). |
colorscale? | | ColorScale | readonly string[] | readonly readonly (number | string)[][] | Colorscale of the aggregated values: a name ('Viridis', 'RdBu', …), a list of colors, or [position, color] stops from 0 to 1. Default: Plotly's RdBu; the default holochart template uses its sequential neon plasma. |
histfunc? | "count" | "sum" | "avg" | "min" | "max" | What each bin shows: the number of samples (count), or the sum, average (avg), min or max of their z values. |
histnorm? | "" | "percent" | "probability" | "density" | "probability density" | Normalization: none, the percentage or fraction of the total (percent, probability), per unit area (density: value / bin area), or both (probability density, integrating to 1). |
marker? | Histogram2dTraceMarker | Aggregation data (Plotly compatibility). |
nbinsx? | number | Maximum number of x bins when xbins.size is not given (a nice round size is picked). 0: automatic. Minimum: 0 |
nbinsy? | number | Maximum number of y bins when ybins.size is not given (a nice round size is picked). 0: automatic. Minimum: 0 |
reversescale? | boolean | Reverse the colorscale (the lowest value gets the last color). |
showscale? | boolean | Show a colorbar for the colorscale (drawn by the colorbar component). |
textfont? | Histogram2dTraceTextfont | Font of the cell labels (texttemplate). |
texttemplate? | string | Label drawn in every cell: %{z} (the bin value), %{x}, %{y} (bin centers), with optional d3 formats (%{z:.1f}). Empty: no labels. |
type | "histogram2d" | Trace type. |
x? | DataColumn | Sample x coordinates (numbers, dates or categories), binned along x. Required, with y. |
xbingroup? | string | Traces (histogram2d, histogram2dcontour, and histograms with the same bingroup) on axes of the same type with the same group share their x bins. |
xbins? | Histogram2dTraceXbins | X binning. |
xgap? | number | Horizontal gap between cells, in px (only without zsmooth). Minimum: 0 |
xhoverformat? | string | d3 number or date format of x values in hover labels. Default: the axis format. |
y? | DataColumn | Sample y coordinates (numbers, dates or categories), binned along y. Required, with x. |
ybingroup? | string | Like xbingroup, for y bins. |
ybins? | Histogram2dTraceYbins | Y binning. |
ygap? | number | Vertical gap between cells, in px (only without zsmooth). Minimum: 0 |
yhoverformat? | string | d3 number or date format of y values in hover labels. Default: the axis format. |
z? | DataColumn | Values aggregated by histfunc (one per sample); counts are used without. |
zauto? | boolean | Compute the color domain from the aggregated values. Defaults to false when both zmin and zmax are given. |
zhoverformat? | string | d3 number format of z values in hover labels (and %{z} in templates). |
zmax? | number | Value mapped to the last colorscale color (with zmin; turns zauto off). |
zmid? | number | With zauto, widen the automatic domain so it is symmetric around this value (diverging data). |
zmin? | number | Value mapped to the first colorscale color (with zmax; turns zauto off). |
zorder? | number | Stacking order among the traces of a subplot: higher is drawn on top. At equal zorder, heatmap-like traces draw below bars and scatter traces (Plotly’s layer order). |
zsmooth? | "fast" | "best" | false | Cell smoothing: none (false, flat cells), 'fast' (bilinear between cell centers, by cell index) or 'best' (bilinear between cell centers in data space, exact for uneven bins). Drawn on the GPU either way. |