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();

myPlot.Add.Circle(0, 0, 10);

// ピクセルのスケール比を 1:1 に強制する
myPlot.Axes.SquareUnits();

// 軸を「引き伸ばそう」としても、軸の範囲は自動的に調整される
myPlot.Axes.SetLimits(-10, 10, -20, 20);

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