Circle with Locked Scale
For circles to always appear circular, the coordinate system must be forced to always display square-shaped pixels. This can be achieved by enabling the axis scale lock.
ScottPlot.Plot myPlot = new();
Random rand = new(0);
for (int i = 0; i < 5; i++)
{
myPlot.Add.Circle(
xCenter: rand.Next(-10, 10),
yCenter: rand.Next(-10, 10),
radius: rand.Next(1, 7));
}
// force pixels to have a 1:1 scale ratio
myPlot.Axes.SquareUnits();
myPlot.SavePng("demo.png", 400, 300);
This recipe is one of many in the Ellipse category
