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

カラーマップからの色

カラーマップを使用して、色のコレクションを取得できます。

ScottPlot.Plot myPlot = new();

IColormap colormap = new ScottPlot.Colormaps.Viridis();
Color[] colors = colormap.GetColors(20);

for (int i = 0; i < colors.Length; i++)
{
    var sig = myPlot.Add.Signal(Generate.Sin());
    sig.Data.XOffset = i *3;
    sig.Data.YOffset = i* .1;
    sig.LineWidth = 3;
    sig.LineColor = colors[i];
}

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