Skip to content

Type Alias: Histogram2dcontourTrace ​

ts
type Histogram2dcontourTrace = CommonTraceAttributes & CartesianTraceAttributes & object;

2D density contours: samples binned along x and y like histogram2d, drawn as contour levels (filled bands, a heatmap, or lines) with optional level labels.

Type Declaration ​

NameTypeDescription
autobinx?booleanObsolete (Plotly compatibility): bins are automatic unless xbins sets them.
autobiny?booleanObsolete (Plotly compatibility): bins are automatic unless ybins sets them.
autocolorscale?booleanPick the colorscale from the sign of the color domain (layout.colorscale.sequential, sequentialminus or diverging). Defaults to true unless colorscale is given.
autocontour?booleanPick the contour levels automatically (at most ncontours, at nice round values). Defaults to false when contours.start and contours.end are given.
bingroup?stringDefault 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?ColorbarThe 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.
contours?Histogram2dcontourTraceContoursContour levels, coloring, labels and constraints.
fillcolor?stringFill of the shaded region of constraint contours. Default: line.color (else the trace's colorway color) at half opacity.
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).
line?Histogram2dcontourTraceLineContour lines.
marker?Histogram2dcontourTraceMarkerAggregation data (Plotly compatibility).
nbinsx?numberMaximum number of x bins when xbins.size is not given (a nice round size is picked). 0: automatic. Minimum: 0
nbinsy?numberMaximum number of y bins when ybins.size is not given (a nice round size is picked). 0: automatic. Minimum: 0
ncontours?numberMaximum number of contour levels with autocontour (or without contours.size); the actual number is chosen to give nice round levels. Minimum: 1
reversescale?booleanReverse the colorscale (the lowest value gets the last color).
showscale?booleanShow a colorbar for the colorscale (drawn by the colorbar component).
textfont?Histogram2dTraceTextfontFont of the cell labels (texttemplate).
texttemplate?stringLabel drawn in every bin with contours.coloring: 'heatmap': %{z}, %{x}, %{y} with optional d3 formats. Empty: no labels.
type"histogram2dcontour"Trace type.
x?DataColumnSample x coordinates (numbers, dates or categories), binned along x. Required, with y.
xbingroup?stringTraces (histogram2d, histogram2dcontour, and histograms with the same bingroup) on axes of the same type with the same group share their x bins.
xbins?Histogram2dcontourTraceXbinsX binning.
xhoverformat?stringd3 number or date format of x values in hover labels. Default: the axis format.
y?DataColumnSample y coordinates (numbers, dates or categories), binned along y. Required, with x.
ybingroup?stringLike xbingroup, for y bins.
ybins?Histogram2dcontourTraceYbinsY binning.
yhoverformat?stringd3 number or date format of y values in hover labels. Default: the axis format.
z?DataColumnValues aggregated by histfunc (one per sample); counts are used without.
zauto?booleanCompute the color domain from the aggregated values. Defaults to false when both zmin and zmax are given.
zhoverformat?stringd3 number format of z values in hover labels (and %{z} in templates).
zmax?numberValue mapped to the last colorscale color (with zmin; turns zauto off).
zmid?numberWith zauto, widen the automatic domain so it is symmetric around this value (diverging data).
zmin?numberValue mapped to the first colorscale color (with zmax; turns zauto off).
zorder?numberStacking order among the traces of a subplot: higher is drawn on top. At equal zorder, contours draw below bars and scatter traces (Plotly’s layer order).

Released under the MIT License.