GitHub Repo stars


A palette is a set of colors, and the Plot’s palette defines the default colors to use when adding new plottables. ScottPlot comes with many standard palettes, but users may also create their own.

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

// change the default palette used when adding new plottables
myPlot.Add.Palette = new ScottPlot.Palettes.Nord();

for (int i = 0; i < 5; i++)
    double[] data = Generate.Sin(100, phase: -i / 20.0f);
    var sig = myPlot.Add.Signal(data);
    sig.LineWidth = 3;

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

Edit on GitHub