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

プロットの外側の凡例

データ領域の外側に凡例を表示するには、Edge を受け取る ShowLegend() オーバーロードを使用します。

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

var sig1 = myPlot.Add.Signal(Generate.Sin());
var sig2 = myPlot.Add.Signal(Generate.Cos());

sig1.LegendText = "サイン";
sig2.LegendText = "コサイン";

myPlot.ShowLegend(Edge.Right);

myPlot.SavePng("demo.png", 400, 300);
このレシピは、凡例カテゴリにある多数のレシピの 1 つです