conmed = structure(list(id = c(2L, 2L), cmstdate = structure(c(2L, 1L), .Label = c("1/1/2014",
"1/3/2014"), class = "factor"), cmmed = structure(c(2L, 1L), .Label = c("Inducers",
"Inhibitors"), class = "factor"), cmstdy = c(2L, 0L), cmendy = c(4L,
1L), cmlocap = c(NA, NA), cmhicap = c(NA, NA), cmseq = 0:1), .Names = c("id",
"cmstdate", "cmmed", "cmstdy", "cmendy", "cmlocap", "cmhicap",
"cmseq"), class = "data.frame", row.names = c(NA, -2L))
proc sgplot data=conmed noautolegend nocycleattrs;
refline 0 / axis=x lineattrs=(thickness=1 color=black);
highlow y=cmseq low=cmstdy high=cmendy / type=bar barwidth=0.8 lowlabel=cmmed
lowcap=cmlocap highcap=cmhicap fillattrs=(color=cx9BDCF2);
scatter y=cmseq x=cmstdate / markerattrs=(size=0) x2axis;
yaxis display=(nolabel noticks novalues) min=0;
xaxis grid label='Study Days' offsetmax=0.02;
x2axis notimesplit display=(nolabel) offsetmax=0.02 tickvalueformat=date7.;
run;