Dear Statalist members
I like to draw multiple circles with varying radius and centers as part of a more complex graph. Thus, I used the - twoway function - command for creating the upper and lower half circle.
However, in some smaller circles (depending on the radius) the two parts of the half circles are not closed to one circle (see picture).

I assume it is because of the number of evaluated points. Because when I change the number of evaluated points to 300000, building the graph is very very slow, but the results look better.
Do you have any ideas, how to improve my circle without loosing that much speed ?
Thank you in advance.
Martin
I like to draw multiple circles with varying radius and centers as part of a more complex graph. Thus, I used the - twoway function - command for creating the upper and lower half circle.
Code:
local r = 0.2 local x0 = 3 local y0 = 2 local x_range_l = (`x0'-`r') local x_range_u = (`x0'+`r') twoway (function y = `y0' - sqrt(`r'^2 - (x - `x0')^2), n(300) range(`x_range_l' `x_range_u') ) ( function y = `y0' + sqrt(`r'^2 - (x - `x0')^2), n(300) range(`x_range_l' `x_range_u') aspect(1) )
I assume it is because of the number of evaluated points. Because when I change the number of evaluated points to 300000, building the graph is very very slow, but the results look better.
Do you have any ideas, how to improve my circle without loosing that much speed ?
Thank you in advance.
Martin
Comment