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

リストデータの散布図

散布図は List から作成できますが、レンダリング中に項目を追加または削除しないよう十分に注意してください。そうしないと、インデックス例外がスローされる可能性があります。詳細については、Render Lock システムに関するドキュメントを参照してください。

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

List<double> xs = new() { 1, 2, 3, 4, 5 };
List<double> ys = new() { 1, 4, 9, 16, 25 };

myPlot.Add.Scatter(xs, ys);

myPlot.SavePng("demo.png", 400, 300);
このレシピは、散布図カテゴリに含まれる多数のレシピの 1 つです