Drawing circle using function in Stata

Updated: Sep 17

You can create a circle in Stata. An example is shown below:

To create the graph above, please use the following commands in a do file:

twoway function y = sqrt(1 - (x)^2), ///
range(-1 1) lwidth(thick) lcolor(red) ///
|| function y = -sqrt(1 - (x)^2), range(-1 1) ///
lwidth(thick) lcolor(red) aspect(1)

Please also check out the book Speaking Stata Graphics for more useful tips.


17 views

© 2020 by Survey Design and Analysis Services. 

  • LinkedIn
  • Facebook
  • Twitter
  • YouTube