I am wondering if there is a way to highlight a range of markers in either a scatter, connected, or xtline plot. For example:
sysuse xtline1, clear
xtset person day
Below, I am using twoway connected and limiting the days of observation. I want to change the marker to open circle if the days are between 24dec2002 and 26dec2002 (in this case, to highlight the spike).
twoway conn calories day if person ==1 & tin(20dec2002, 29dec2002), sort mcolor(black) lcolor(black) ///
msymbol (Oh if tin(24dec2002, 26dec2002)) ///
|| conn calories day if person ==2 & tin(20dec2002, 29dec2002), sort ///
|| conn calories day if person ==3 & tin(20dec2002, 29dec2002), sort ///
legend(order(1 "Tess" 2 "Sam" 3 "Arnold"))
note the "msymbol (Oh if tin(24dec2002, 26dec2002))" is where the issue is.
Thanks in advance!
Ariel
sysuse xtline1, clear
xtset person day
Below, I am using twoway connected and limiting the days of observation. I want to change the marker to open circle if the days are between 24dec2002 and 26dec2002 (in this case, to highlight the spike).
twoway conn calories day if person ==1 & tin(20dec2002, 29dec2002), sort mcolor(black) lcolor(black) ///
msymbol (Oh if tin(24dec2002, 26dec2002)) ///
|| conn calories day if person ==2 & tin(20dec2002, 29dec2002), sort ///
|| conn calories day if person ==3 & tin(20dec2002, 29dec2002), sort ///
legend(order(1 "Tess" 2 "Sam" 3 "Arnold"))
note the "msymbol (Oh if tin(24dec2002, 26dec2002))" is where the issue is.
Thanks in advance!
Ariel