-
Notifications
You must be signed in to change notification settings - Fork 0
3.6 Plot
amaliejvik edited this page Jul 3, 2024
·
3 revisions
The plot displays a function plot for a mathematical single-variable expression.
- none
-
func: stringA mathematical expression as a string that will be parsed when calculating the plot points.
-
numPoints?: numberThe 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?: booleanWhether the plot should be dashed. -
lineWidth?: numberLinewidth of the plot. -
color?: numberColor of the graph line. -
coefficients?: CoefficientsAny coefficients that was used in the function string should be specified with a value here. -
plotRange?: numberHow 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,
getName(): stringgetColorAsString(): stringgetDisplayText(): stringhover(): voidunhover(): void
-
setCoefficients(coefficients: Coefficients): voidSet the coefficients to a specified value. Will re-render the graph accordingly. -
setExpression(expression: string): voidSet the function expression to a specified string value. Will re-render the graph accordingly.