Figures - norrissam/ra-manual GitHub Wiki
Figure style
The background should always be white
graphregion(color(white))
Here are some good RGB colors for lines and markers:
red-pink: 216 27 96
blue: 30 136 229
green: 68 128 63
orange: 255 193 7
other stata options: midblue, cranberry
To use these as a color, put the rbg code in quotes (e.g., ```, ... color("216 27 96")''').
Axis labels should be informative ...
Graphs should be legible in black and white:
- For scatter plots, use different marker shapes to differentiate groups (circle, triangle, square, etc.)
- Use longdash and dash to differentiate lines (eg. estimates vs. confidence intervals)
twoway (line ols_est year, lcolor(midblue)) ///
(line ols_min95 ols_max95 year, lcolor(midblue%40) lpattern(dash dash)) ///
(line iv_estimate year, lcolor(cranberry) lpattern(longdash)) ///
(line iv_min95 iv_max95 year, lcolor(cranberry%40) lpattern(dash dash)), ///
xtitle("Year relative to incarceration") ytitle("Effect") ///
xlabel(-6(1)8, labsize(small)) ylabel(-250(50)250, labsize(small) angle(0)) ///
legend(order(1 "OLS estimate" 3 "IV estimate"))
graphregion(color(white)) bgcolor(white)
twoway (scatter estimate x if x==1, color("30 136 229") msymbol(circle)) ///
(rcap min95 max95 x if x==1, color("30 136 229")) ///
(scatter estimate x if x==2, color("68 128 63") msymbol(triangle)) ///
(rcap min95 max95 x if x==2, color("68 128 63")), ///
legend(order(1 "Extensive" 3 "Intensive" rows(1) position(11) ring(0) size(small)) ///
graphregion(color(white))
Multiple panel figure
Titles and notes should not be on the graph. We add them using a tex wrapper. Here is an example of a figure with multiple panels:
\clearpage
\begin{figure}[!ht]
\centering
\caption{Effect of police response on future calls}
\label{fig:future_calls}
\begin{tabular}{c}
(a) Effect on future call within 30 days \\
\includegraphics[width=0.75\textwidth]{fig/future_calls/effect_30_days.pdf} \\
(b) Effect on future call within 60 days \\
\includegraphics[width=0.75\textwidth]{fig/future_calls/effect_60_days.pdf} \\
\end{tabular}
\parbox{\textwidth}{\footnotesize
\vspace{1eX}\emph{Notes}: ...
}
\end{figure}