Skip to content

Interface: Histogram2dcontourTraceContours ​

Contour levels, coloring, labels and constraints.

Properties ​

PropertyTypeDefault valueDescription
coloring?"none" | "fill" | "heatmap" | "lines""fill"How levels are colored: flat bands between levels ('fill'), a smooth heatmap under the lines ('heatmap'), colored lines only ('lines'), or plain line.color lines ('none'). Not used by constraint contours.
end?numberundefinedLast contour level (with start, turns autocontour off).
labelfont?Histogram2dcontourTraceContoursLabelfontundefinedFont of the level labels. Defaults to layout.font, colored like the lines.
labelformat?string""d3 number format of the level labels, e.g. .2f. Default: automatic.
operation?| "=" | "<" | ">=" | ">" | "<=" | "[]" | "()" | "[)" | "(]" | "][" | ")(" | "](" | ")[""="Constraint contours: '=' draws the line where z equals value; '<' / '<=' and '>' / '>=' shade where z is below or above value; '[]', '()', '[)', '(]' shade inside the interval value, '][', ')(', '](', ')[' outside it. Open and closed ends draw the same.
showlabels?booleanfalseLabel contour lines with their level, along the lines (the lines break under the labels).
showlines?booleantrueDraw the contour lines (only for coloring: 'fill' and shaded constraints; always drawn otherwise).
size?numberundefinedStep between contour levels. Default: a nice round step from ncontours. Minimum: 0
start?numberundefinedFirst contour level (with end, turns autocontour off).
type?"levels" | "constraint""levels"'levels': lines (and fills) at every level. 'constraint': the boundary of the region where z satisfies operation and value, with the region shaded in fillcolor for inequalities.
value?unknown0Constraint contours: the boundary value, a number for comparisons, or [lower, upper] for intervals (a single number v means [v, v + 1]).

Released under the MIT License.