Code
library(Statamarkdown)
Andy Grogan-Kaylor
February 5, 2024
Another attempt to make an aesthetically appealing graph with Stata.
I make use of the ///
notation which allows me to spread the graph along multiple lines.
twoway (scatter GDP year, mcolor(%10)) /// scatterplot; transparent markers
(lowess GDP year, lwidth(thick)), /// lowess smoother
xlabel(, angle(270) labsize(vsmall)) /// x label tweaks
ylabel(, angle(0) labsize(vsmall)) /// y label tweaks
by(region, title("GDP by Year") ///
note ("World Bank Data: Every Dot is a Country-Year") ///
legend(off)) ///
subtitle(, size(small)) ///
xsize(5) ysize(5) /// x and y size
scheme(michigan)
graph export aesthetically-appealing-World-Bank.svg, width(2000) replace