ScottPlot.NET
GitHub Repo stars

Dark Mode

Plots can be created using dark mode by setting the colors of major plot components to ones consistent with a dark theme.

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

// set the color palette used when coloring new items added to the plot
myPlot.Add.Palette = new ScottPlot.Palettes.Penumbra();

// add things to the plot
for (int i = 0; i < 5; i++)
{
    var sig = myPlot.Add.Signal(Generate.Sin(51, phase: -.05 * i));
    sig.LineWidth = 3;
    sig.Label = $"Line {i + 1}";
}
myPlot.XLabel("Horizontal Axis");
myPlot.YLabel("Vertical Axis");
myPlot.Title("ScottPlot 5 in Dark Mode");
myPlot.ShowLegend();

// change figure colors
myPlot.Axes.Color(Color.FromHex("#d7d7d7"));
myPlot.Grid.MajorLineColor = Color.FromHex("#404040");
myPlot.FigureBackground.Color = Color.FromHex("#181818");
myPlot.DataBackground.Color = Color.FromHex("#1f1f1f");
myPlot.Legend.BackgroundFill.Color = Color.FromHex("#404040");
myPlot.Legend.Font.Color = Color.FromHex("#d7d7d7");
myPlot.Legend.OutlineStyle.Color = Color.FromHex("#d7d7d7");

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

Edit on GitHub