One potential issue with using
plottools:-circle is that the shape can appear as an ellipse if, say, the displayed x- and y-views are not equal and the
scaling is not
constrained. (Eg. change the x-range to
x=-1.4 .. -0.9 to see this effect.)
Also, such a circle can get rendered a little roughly.
An alternative is to use
plottools:-point and set the
solidcircle, which should render as circles regardless of the view or scaling.
You can even program it to compute the limits and value, etc.
f := x -> piecewise(x <= -1, -2-x,
-1 < x and x <= 1, 4-4*x^2,
1 < x, x^2-4*x+3):
setoptions(color="DarkRed", symbolsize=16, symbol=circle);
point([-1, f(-1)], symbol=solidcircle),
plot(f(x), x = -4 .. 4, discont = true));
In the above code a few plot options are set as new defaults, which can get overridden with optional arguments to the plotting commands. (Eg.
symbol=solidcircle, when passed as an option, overrides the new default of