ScottPlot.NET
GitHub Repo stars

Function Limit X

A function can be limited to a range of X values.

ScottPlot.Plot myPlot = new();

static double func1(double x) => (Math.Sin(x) * Math.Sin(x / 2));

var f = myPlot.Add.Function(func1);
f.MinX = -3;
f.MaxX = 3;

myPlot.Axes.SetLimits(-5, 5, -.2, 1.0);

myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Function category