getGraph method
Implementation
FunctionGraph getGraph(
double Function(double) function, {
double stepSize = 0.01, // use a step size <= 0 for automatic step size
double? xMin,
double? xMax,
double dt = 1e-8,
List<double> discontinuities = const [],
Color color = WHITE,
}) {
xMin ??= this.xMin;
xMax ??= this.xMax;
var graph = FunctionGraph(
function: function,
stepSize: stepSize,
xMin: xMin,
xMax: xMax,
dt: dt,
discontinuities: discontinuities,
color: color,
)..applyFunction((pt) => coordsToPoint(pt));
return graph;
}