I am making a line graph where x axis is the year. I want to highlight/shade the periods between 2007-2009 and 2016-2018 respectively. I used the area in twoway line graph but it shades only the area under the line. How can I highlight years?
My code:
Code:
twoway (line unique year, by(type) xline(2007 2009 2016 2018)) /// (area unique year if year>=2007 & year<=2009 & year>=2016 & year<=2018)
I found one reference image online:
Array
0 Response to Shaded bar between values of X axis of a line graph
Post a Comment