Line Plot Shapes
Line plots can be styled using a LineStyle.
ScottPlot.Plot myPlot = new();
ScottPlot.Colormaps.Viridis colormap = new();
for (int i = 0; i < 10; i++)
{
// add a line
Coordinates start = Generate.RandomCoordinates();
Coordinates end = Generate.RandomCoordinates();
var line = myPlot.Add.Line(start, end);
// customize the line
line.LineColor = Generate.RandomColor(colormap);
line.LineWidth = Generate.RandomInteger(1, 4);
line.LinePattern = Generate.RandomLinePattern();
// customize markers
line.MarkerLineColor = line.LineStyle.Color;
line.MarkerShape = Generate.RandomMarkerShape();
line.MarkerSize = Generate.RandomInteger(5, 15);
}
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Line Plot category
