Plot y = f(x) for a user-typed mathematical expression over a range. Whitelist exposes Math.* (sin, cos, exp, log, sqrt, pow, abs, …) and constants PI / E.
A small calculator function plotter. The expression is evaluated at n sample points and rendered as a line. Use it to overlay theoretical curves on data, sketch fits, or just sanity-check a formula.
Expression in `x` + x range + sample-point count (10–5000).
Line plot of the sampled values.
Useful to sanity-check an expression before fitting it nonlinear-regression style to data — if the curve doesn't match the data shape, the fit will struggle regardless of starting values.