UI XY Plot
Line plot of streaming values.
Type: UIXYPlotNode · Category: UI & Interface · Also found as: uixyplot
Properties
Section titled “Properties”| Property | Type | Default | Description |
|---|---|---|---|
size |
vec2 | (380, 180) |
Width and height (px). Range 4 to 1280. |
xMin |
number | 0 |
Left end of the X axis. |
xMax |
number | 10 |
Right end of the X axis. |
yMin |
number | -1.5 |
Bottom of the Y axis. |
yMax |
number | 1.5 |
Top of the Y axis. |
autoScaleX |
boolean | false |
Fit the X axis to the data. |
autoScaleY |
boolean | false |
Fit the Y axis to the data. |
showGrid |
boolean | true |
Draw grid lines. |
showPoints |
boolean | true |
Mark each data point. |
showCrosshair |
boolean | true |
Crosshair with the value under the mouse. |
lineColor |
color | #3b82f6ff |
Colour of the line. |
secondaryLineColor |
color | #f59e0bff |
Colour of the second series. |
gridColor |
color | #282c37ff |
Grid line colour. |
Plus the common properties every node has.
Lua methods
Section titled “Lua methods”Call them on the node (self.node in its script, or self.node:get_node("path")). Every node also has the Node methods.
UIXYPlotNode:get_property(path)
Section titled “UIXYPlotNode:get_property(path)”Reads an Inspector property by its path (vectors and colours as tables); “script.
local value = self.node:get_property("size")pathUIXYPlotNodeProperty|string
Returns any
UIXYPlotNode:set_property(path, value, y)
Section titled “UIXYPlotNode:set_property(path, value, y)”Sets an Inspector property by its path: vectors as {x, y} or x, y; colours as {r, g, b[, a]} 0..1 or “#rrggbb[aa]”; enums by name; “script.
self.node:set_property("size", 100, 50)pathUIXYPlotNodeProperty|stringvalueanyy?number
In a scene file
Section titled “In a scene file”{ "type": "UIXYPlotNode", "name": "UIXYPlot", "position": [ 0, 0 ], "properties": { "size": [ 380, 180 ], "xMin": 0, "xMax": 10 }}