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

SetTicks ショートカット

デフォルトの軸には SetTicks() ヘルパーメソッドがあり、デフォルトの目盛りジェネレーターを、提供された目盛りで事前に読み込まれた手動の目盛りジェネレーターに置き換えます。

ScottPlot.Plot myPlot = new();

// サンプルデータを表示する
myPlot.Add.Signal(Generate.Sin());
myPlot.Add.Signal(Generate.Cos());

// 手動で定義した目盛りを使用する
double[] tickPositions = { 10, 25, 40 };
string[] tickLabels = { "Alpha", "Beta", "Gamma" };
myPlot.Axes.Bottom.SetTicks(tickPositions, tickLabels);

myPlot.SavePng("demo.png", 400, 300);
このレシピは、目盛りのカスタマイズカテゴリーにある多数のレシピの 1 つです