Data Visualization With Stata

Visualizing Data With Stata

stats
dataviz
Author

Andy Grogan-Kaylor

Published

September 8, 2023

Show the code
use gutten.dta

twoway (scatter height age_base, mcolor(green%50)) ///
(lfit height age_base, lcolor(gold) lwidth(thick)), ///
title("Tree Height by Tree Age") ///
caption("Gutten Tree Data") ///
xtitle("Tree Age") ///
ytitle("Tree Height")

graph export "gutten.png", width(2000) replace

Graph of Gutten Tree Data

Graph of Gutten Tree Data

Stata is a powerful and intuitive data analysis program. However, Stata is often under-appreciated as data visualization software. Learning how to graph in Stata is an important part of learning how to use Stata. In older versions of Stata, the default graphs in Stata could sometimes be less than optimal. In newer versions of Stata, the default graphs have been very much improved and are professional looking and aesthetically appealing out of the box. With a few tweaks, graphs in Stata can be even further customized.

I posted a few materials on using Stata for data visualization: