凡例内の軸線
軸線は、ExcludeFromLegend プロパティが true でない限り、Text プロパティが設定されている場合に凡例へ追加されます。
ScottPlot.Plot myPlot = new();
myPlot.Add.Signal(Generate.Sin());
myPlot.Add.Signal(Generate.Cos());
var axLine1 = myPlot.Add.VerticalLine(24);
axLine1.Text = "線 1";
var axLine2 = myPlot.Add.HorizontalLine(0.75);
var axLine3 = myPlot.Add.VerticalLine(37);
axLine3.Text = "線 3";
axLine3.ExcludeFromLegend = true;
var axLine4 = myPlot.Add.HorizontalLine(0.25);
axLine4.Text = "線 4";
var axLine5 = myPlot.Add.HorizontalLine(-.75);
axLine5.Text = "線 5";
axLine5.ExcludeFromLegend = true;
myPlot.ShowLegend();
myPlot.SavePng("demo.png", 400, 300);
このレシピは、軸線カテゴリにある多数のレシピのうちの 1 つです
