ScottPlot.NET
GitHub Repo stars

Grid with Top Axis

Grid lines use the bottom and left axes by default, but this behavior can be customized for plots which use other axes.

ScottPlot.Plot myPlot = new();

var sig = myPlot.Add.Signal(ScottPlot.Generate.Sin());
sig.Axes.XAxis = myPlot.Axes.Top;
myPlot.Grid.XAxis = myPlot.Axes.Top;

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