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

パレット

パレットは色の集合であり、Plot のパレットは新しい plottable を追加するときに使用するデフォルトの色を定義します。https://scottplot.net/cookbook/5/palettes/ には、ScottPlot に含まれるすべてのパレットが表示されています。

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

// 新しい plottable を追加するときに使用するデフォルトのパレットを変更する
myPlot.Add.Palette = new ScottPlot.Palettes.Nord();

for (int i = 0; i < 5; i++)
{
    double[] data = Generate.Sin(100, phase: -i / 20.0f);
    var sig = myPlot.Add.Signal(data);
    sig.LineWidth = 3;
}

myPlot.SavePng("demo.png", 400, 300);
このレシピは、プロットのスタイリングカテゴリに含まれる多数のレシピの 1 つです