Module implementing a contour plot. A contour plot can show slow changes of a variable in two dimensions when displaying the raw data would result in over plotting.
Parent element to append widget to. If not specified, widget is appended to body. optional
layers
du.widgets.contourplot.ContourPlot.layers(count)
Sets the number of contour layers which are distributed uniformly over the scale of the data. Default is 20.
arg
type
description
count
number
Number of layers to use.
return
description
du.widgets.contourplot.ContourPlot
Reference to the current ContourPlot.
grid
du.widgets.contourplot.ContourPlot.grid(size)
Sets the grid size to compute contours on. Default is [40, 40].
arg
type
description
size
number[]
Array of numbers containing the horizontal and vertical size of the grid..
return
description
du.widgets.contourplot.ContourPlot
Reference to the current ContourPlot.
borders
du.widgets.contourplot.ContourPlot.borders(on)
Adds borders to the contours. Default is false.
arg
type
description
on
boolean
Whether to add borders.
return
description
du.widgets.contourplot.ContourPlot
Reference to the current ContourPlot.
colors
du.widgets.contourplot.ContourPlot.colors(colors)
Sets the min, mid and max colors of the contour plot. Must be an array with three colors. The color of intermediate contours is interpolated with HSL interpolation. Default color set is [transparent, grey, black].
Overrides: du.widgets.Widget.colors
arg
type
description
colors
string[]
Start and end colors of the gauge.
return
description
du.widgets.contourplot.ContourPlot
Reference to the current ContourPlot.
data
du.widgets.contourplot.ContourPlot.data(data)
Binds data to the contour plot. Expected data format: array of objects containing the x, y coordinates of the data points and a value denoting the weight of the data point. If value is missing, it is assumed to be 1.