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 radius = 1.0;
Angle start = Angle.FromDegrees(45);
Angle sweep = Angle.FromDegrees(135);

var circle = myPlot.Add.Circle(center, radius);
circle.FillColor = Colors.Blue.WithAlpha(.2);
circle.LineWidth = 0;

var arc = myPlot.Add.Arc(center, radius, start, sweep);
arc.LineWidth = 5;
arc.LineColor = Colors.Black;

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

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