Multiple Sine Waves
This recipe demonstrates creation of a noisy waveform containing multiple sine waves with different frequencies.
ScottPlot.Plot myPlot = new();
double[] values = Generate.RandomNormal(500, stdDev: 0.2);
for (int i = 1; i < 10; i++)
{
var sig = myPlot.Add.Signal(values);
sig.Data.YOffset = i * 3;
sig.LineWidth = 1.5f;
values = Generate.AddSin(values, oscillations: i);
}
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Sample Data category
