GitHub Repo stars

SetTicks Shortcut

The default axes have a SetTicks() helper method which replaces the default tick generator with a manual tick generator pre-loaded with the provided ticks.

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

// display sample data

// use manually defined ticks
double[] tickPositions = { 10, 25, 40 };
string[] tickLabels = { "Alpha", "Beta", "Gamma" };
myPlot.Axes.Bottom.SetTicks(tickPositions, tickLabels);

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

Edit on GitHub