ScottPlot.NET
GitHub Repo stars

Plot Border

Plots can be assigned borders to draw around the figure or data area.

ScottPlot.Plot myPlot = new();

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

myPlot.FigureBorder = new()
{
    Color = Colors.Magenta,
    Width = 3,
    Pattern = LinePattern.Dotted,
};

myPlot.DataBorder = new()
{
    Color = Colors.Green,
    Width = 3,
    Pattern = LinePattern.DenselyDashed,
};

// the hide axis frame lines so our custom border is the only one
myPlot.Axes.Frame(false);

myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Styling Plots category