I am using -graph hbar- to create horizontal bars on means by groups. Does anyone know how to add vertical reference lines in the chart?
In the example chart generated by the following code, there would be four reference lines, one on the first 2 bars (N Eng and Mid Atl) for NE, one for N Central (ENC and WNC), one for South (S Atl, ESC, and WSC), and one for West. The values of the reference lines are 28 for NE, 22 for N Central, 46 for South, and 46 for West. These are means by region. Thanks in advance!
use https://www.stata-press.com/data/r17/citytemp, clear
graph hbar (mean) tempjan, over(division) over(region) nofill ytitle("Degrees Fahrenheit") ///
title("Average January temperature") ///
subtitle("by region and division of the United States") ///
note("Source: U.S. Census Bureau, U.S. Dept. of Commerce")
0 Response to Add vertical reference lines in horizontal bars
Post a Comment