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

楕円扇形

楕円扇形は、楕円の内側で、その外周に沿った弧と中心点との間の領域によって形成される2D形状です。

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

Coordinates center = new(0, 0);
double radiusX = 2.0;
double radiusY = 1.0;
Angle start = Angle.FromDegrees(45);
Angle sweep = Angle.FromDegrees(135);

var cs = myPlot.Add.EllipticalSector(center, radiusX, radiusY, 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つです