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")
Related Posts with Add vertical reference lines in horizontal bars
Doing Diff-in-Diff with lagged dependent using xtabondHi, I'm doing a diff-in-diffs type of model with xtabond, but would be grateful for help establishin…
Structural Breaks in time-seriesHi everyone! I really need your advice!! I have a multivariate time-series model with yearly observ…
Interpretation of Outreg2 table on terrorism event studyHi everyone! I am a student and do a thesis on the abnormal return generated by domestic terrorism …
Forval loops with if-conditions in Panel dataHello together. I am still struggling with my current research. I want to run the following code in…
Twoway line for tabulated resultsHello Everyone! I am using stata 16 and my data us the demographic health survey women's module. I …
Subscribe to:
Post Comments (Atom)
0 Response to Add vertical reference lines in horizontal bars
Post a Comment