ScottPlot.NET
GitHub Repo stars

Line Styles

Many plot types have a LineStyle which can be customized.

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

LinePattern[] linePatterns = Enum.GetValues<LinePattern>().ToArray();

for (int i = 0; i < linePatterns.Length; i++)
{
    LinePattern pattern = linePatterns[i];

    var line = myPlot.Add.Line(0, -i, 1, -i);
    line.LinePattern = pattern;
    line.LineWidth = 2;
    line.Color = Colors.Black;

    var txt = myPlot.Add.Text(pattern.ToString(), 1.1, -i);
    txt.Size = 18;
    txt.Bold = true;
    txt.Color = Colors.Black;
    txt.Label.Alignment = Alignment.MiddleLeft;
}

myPlot.Axes.Margins(right: 1);
myPlot.HideGrid();
myPlot.Layout.Frameless();

myPlot.ShowLegend();

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

Edit on GitHub