Bar with Value Labels
Set the Label property of bars to have text displayed above each bar.
ScottPlot.Plot myPlot = new();
double[] values = { 5, 10, 7, 13 };
var barPlot = myPlot.Add.Bars(values);
// define the content of labels
foreach (var bar in barPlot.Bars)
{
bar.Label = bar.Value.ToString();
}
// customize label style
barPlot.ValueLabelStyle.Bold = true;
barPlot.ValueLabelStyle.FontSize = 18;
myPlot.Axes.Margins(bottom: 0, top: .2);
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Bar Plot category
