Minor Tick Density
Minor tick marks are automatically generated at intervals between major tick marks. By default they are evenly spaced, but their density may be customized.
ScottPlot.Plot myPlot = new();
// plot sample data
double[] xs = Generate.Consecutive(100);
double[] ys = Generate.NoisyExponential(100);
var sp = myPlot.Add.Scatter(xs, ys);
sp.LineWidth = 0;
// create a minor tick generator with 10 minor ticks per major tick
ScottPlot.TickGenerators.EvenlySpacedMinorTickGenerator minorTickGen = new(10);
// create a numeric tick generator that uses our custom minor tick generator
ScottPlot.TickGenerators.NumericAutomatic tickGen = new();
tickGen.MinorTickGenerator = minorTickGen;
// tell the left axis to use our custom tick generator
myPlot.Axes.Left.TickGenerator = tickGen;
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Customizing Ticks category
