Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

折れ線プロットの凡例

ラベル付きの折れ線プロットは凡例に表示されます。

Line.cs
ScottPlot.Plot myPlot = new();

var sin = myPlot.Add.Signal(Generate.Sin());
sin.LegendText = "正弦";

var cos = myPlot.Add.Signal(Generate.Cos());
cos.LegendText = "余弦";

var line = myPlot.Add.Line(1, 12, 12, 0);
line.LineWidth = 3;
line.MarkerSize = 10;
line.LegendText = "折れ線プロット";

myPlot.ShowLegend(Alignment.UpperRight);

myPlot.SavePng("demo.png", 400, 300);
このレシピは、折れ線プロットカテゴリにある多数のレシピの 1 つです