環状扇形
環状扇形は、2つの円の間にある2D図形(ドーナツのような形)で、中心点を基準とした2つの角度の間の領域だけを含むように切り取ることができます。
ScottPlot.Plot myPlot = new();
Coordinates center = new(0, 0);
double outerRadius = 2.0;
double innerRadius = 1.0;
Angle start = Angle.FromDegrees(45);
Angle sweep = Angle.FromDegrees(135);
var cs = myPlot.Add.AnnularSector(center, outerRadius, innerRadius, start, sweep);
cs.FillColor = Colors.Blue.WithAlpha(.2);
cs.LineColor = Colors.Black;
cs.LineWidth = 5;
myPlot.Axes.SquareUnits(); // 円が引き伸ばされないように正方形の単位を使用する
myPlot.SavePng("demo.png", 400, 300);
このレシピは、図形カテゴリにある多くのレシピの1つです
