ScottPlot.NET
GitHub Repo stars

Annotation Customization

Annotations can be extensively customized.

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

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

var anno = myPlot.Add.Annotation("Customized\nAnnotation");
anno.Label.FontSize = 32;
anno.Label.FontName = Fonts.Serif;
anno.Label.BackColor = Colors.RebeccaPurple.WithAlpha(.3);
anno.Label.ForeColor = Colors.RebeccaPurple;
anno.Label.BorderColor = Colors.Green;
anno.Label.BorderWidth = 3;
anno.OffsetY = 40;
anno.OffsetX = 20;

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

Edit on GitHub