contour
lq.contour(x, y, z, levels: 10, fill: false, stroke: 0.7pt, map: color.map.viridis, min: auto, max: auto, norm: "linear", label: none, z-index: 2)(source)Creates a contour plot for a 3-dimensional mesh. Given a set of levels,
a number of cuts through the mesh are computed automatically and displayed
as contour lines. Contour plots can be either just stroked
#lq.diagram(
width: 4cm, height: 4cm,
lq.contour(
lq.linspace(-5, 5, num: 12),
lq.linspace(-5, 5, num: 12),
(x, y) => x * y,
map: color.map.icefire,
)
)
or filled per-level.
#lq.diagram(
width: 4cm, height: 4cm,
lq.contour(
lq.linspace(-5, 5, num: 12),
lq.linspace(-5, 5, num: 12),
(x, y) => x * y,
map: color.map.icefire,
fill: true
)
)
x : array
A one-dimensional array of data coordinates.
y : array
A one-dimensional array of data coordinates.
z : array | function
Specifies the coordinates (height) for all combinations of and coordinates. This can either be a
levels : int | array default: 10
Specifies the levels to compute contours for. If this is an integer, an according number of levels is automatically selected evenly from a ticking pattern. TODO: unclear. The desired levels can also be selected manually by passing an array of () coordinates.
fill : bool default: false
Whether to fill the contour levels.
stroke : stroke default: 0.7pt
How to stroke the contours in the cases that fill: false. If this
argument specifies a color, the coloring from the contour.map is
overridden.
map : array | gradient default: color.map.viridis
A color map in form of a gradient or an array of colors to sample from.
min : auto | int | float default: auto
Sets the data value that corresponds to the first color of the color map. If set
to auto, it defaults to the minimum value.
max : auto | int | float default: auto
Sets the data value that corresponds to the last color of the color map. If set
to auto, it defaults to the maximum value.