Polar Axis Line Customization
The angle and length of spokes and position of circles can be manually defined. Each spoke and circle may also be individually styled.
ScottPlot.Plot myPlot = new();
var polarAxis = myPlot.Add.PolarAxis();
// define spoke angle and length
polarAxis.Spokes.Clear();
polarAxis.Spokes.Add(new(Angle.FromDegrees(0), 0.5));
polarAxis.Spokes.Add(new(Angle.FromDegrees(45), 0.75));
polarAxis.Spokes.Add(new(Angle.FromDegrees(90), 1.0));
// define circle radius
polarAxis.Circles.Clear();
polarAxis.Circles.Add(new(0.5));
polarAxis.Circles.Add(new(0.75));
polarAxis.Circles.Add(new(1.0));
// style individual spokes and circles
ScottPlot.Palettes.Category10 pal = new();
for (int i = 0; i < 3; i++)
{
polarAxis.Circles[i].LineColor = pal.GetColor(i).WithAlpha(.5);
polarAxis.Spokes[i].LineColor = pal.GetColor(i).WithAlpha(.5);
polarAxis.Circles[i].LineWidth = 2 + i * 2;
polarAxis.Spokes[i].LineWidth = 2 + i * 2;
}
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Polar Axis category
