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
Cumulative frequency of unique values within groupsHello statalist, My dataset is an unbalanced time series (with repeated years). Each company can ha…
Changing Axis Range - Pre Saved .gphHi Im having an issue with a pre saved graph. I would like to change the range of mye y-axis. Someon…
Within Estimator StataI have a set of panel data showing Unemployment in NI & ROI pre brexit in 2015 and post brexit i…
Graph dummy variableDear users Hope you are doing well. I have a panel data. My Dep is dummy (0, 1), and I have a dummy …
How to find the matched observation with nearest Mahalanobis distance?Hi everyone, I am wondering how to find the matched observation with nearest Mahalanobis distance. …
Subscribe to:
Post Comments (Atom)
0 Response to Add vertical reference lines in horizontal bars
Post a Comment