* Load example dataset
sysuse auto, clear
* Create a full, customized histogram
histogram mpg, ///
frequency /// Frequency instead of density
width(2) /// Set bin width
start(10) /// Set start point
addlabel /// Label bars with frequency
addlabopts(mlabsize(small) mlabcolor(black)) /// Format labels
normopts(lcolor(red) lwidth(medium)) /// Normal distribution line styling
normal /// Add a normal distribution curve
title("Distribution of MPG") /// Main title
xtitle("Miles per Gallon") /// X-axis label
ytitle("Frequency") /// Y-axis label
color(navy*0.8) /// Bar color
fintensity(inten80) /// Intensity of color
ylabel(, angle(horizontal)) // Make labels horizontal