-
Notifications
You must be signed in to change notification settings - Fork 0
3.6 Plot
Jonas de Luna Skulberg edited this page Oct 14, 2023
·
3 revisions
The plot displays a function plot for a mathematical single-variable expression.
- none
-
func: string
A mathematical expression as a string that will be parsed when calculating the plot points.
-
numPoints?: number
The number of points to use when approximating the graph. This should be left untouched unless serious performance issues occurs, or the plot is too inaccurate. -
dashed?: boolean
Whether the plot should be dashed. -
lineWidth?: number
Linewidth of the plot. -
color?: number
Color of the graph line. -
coefficients?: Coefficients
Any coefficients that was used in the function string should be specified with a value here. -
plotRange?: number
How far the plot should extend on each side of the x-axis. Should be left untouched. Use plotBetween instead. -
plotBetween: [number, number] | undefined
: Two x-values to plot the graph between.
Coefficients = { [key: string]: number; }
numPoints: 1500,
dashed: false,
lineWidth: 4,
color: 0xfaa307,
coefficients: {},
plotBetween: undefined,
- none
-
setCoefficients(coefficients: Coefficients): void
Set the coefficients to a specified value. Will re-render the graph accordingly. -
setExpression(expression: string): void
Set the function expression to a specified string value. Will re-render the graph accordingly.