ScottPlot.NET
GitHub Repo stars

Vertical SignalXY with Inverted Y Axis

Demonstrates how to display a rotated SignalXY plot on an inverted vertical axis so data goes from top to bottom.

This code sample is specific to ScottPlot 5 (details)
ScottPlot.Plot myPlot = new();

// add a signal plot
double[] xs = Generate.Consecutive(5_000);
double[] ys = Generate.Sin(count: xs.Length, oscillations: 4);

// rotate it so it is vertical
var signal = myPlot.Add.SignalXY(xs, ys);
signal.Data.Rotated = true;

// invert the vertical axis
myPlot.Axes.SetLimitsY(5000, 0);

myPlot.SavePng("demo.png", 400, 300);

Edit on GitHub