Set Label Underline
Underlines may be added to label styles. Underline thickness and offset may be customized as well.
ScottPlot.Plot myPlot = new();
for (int i = 0; i < 5; i++)
{
var text = myPlot.Add.Text($"Underline {i}px", i / 5.0, i);
text.LabelFontSize = 24;
text.LabelFontColor = ScottPlot.Palette.Default.GetColor(i);
text.LabelUnderline = true;
text.LabelUnderlineWidth = i;
text.LabelUnderlineOffset = 2 + i / 2;
}
myPlot.Axes.SetLimits(-1, 5, -1, 4);
myPlot.HideGrid();
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Styling Plots category
