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

楕円弧

楕円弧は、楕円の円周の一部に沿った曲線です。楕円は右端から始まり、反時計回りに延びます。

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 ellipse = myPlot.Add.Ellipse(center, radiusX, radiusY);
ellipse.FillColor = Colors.Blue.WithAlpha(.2);
ellipse.LineWidth = 0;

var arc = myPlot.Add.EllipticalArc(center, radiusX, radiusY, start, sweep);
arc.LineWidth = 5;
arc.LineColor = Colors.Black;

myPlot.Axes.SquareUnits(); // 円が引き伸ばされないように正方形単位を使用する

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