ScottPlot.NET
Advanced customization of tick marks and tick labels

This page is part of the ScottPlot 5.0 Cookbook

Custom Tick Generators

Alternative tick generators can be created and assigned to axes. Some common tick generators are provided with ScottPlot, and users also have the option create their own.

ScottPlot.Plot myPlot = new();

myPlot.Add.Signal(Generate.Sin(51));
myPlot.Add.Signal(Generate.Cos(51));

ITickGenerator customTickGenerator = new ScottPlot.TickGenerators.NumericFixedInterval(11);

myPlot.XAxis.TickGenerator = customTickGenerator;

myPlot.SavePng("custom-tick-generators.png");