When you want the graph like you want the graph, I often recommend using annotate ...
Here's one way to get the values you want on the xaxis using annotate. I make the actual xaxis values 'white' (so they'll be invisible against the white background, but so they also 'reserve the space' for the labels I'm going to annotate). I've also modified your data section a bit to use a delimiter, so it will be easier for others to copy-n-paste and run.
data ae0;
retain aestdateMin;
retain aeendateMax;
attrib aestdate informat=yymmdd10. format=date7.;
attrib aeendate informat=yymmdd10. format=date7.;
length aedecod $50;
format aestdateMin aeendateMax date7.;
drop aestdateMin aeendateMax;
input aeseq aedecod $ aesev $ aestdate aeendate;
aestdateMin=min(aestdate, aestdateMin);
aeendateMax=max(aeendate, aeendateMax);
call symputx('mindate', aestdateMin);
call symputx('maxdate', aeendateMax);
y=aeseq;
if aedecod=" " then y=-9;
infile datalines dlm=':';
datalines;
.: :MILD::2013-03-06:2013-03-06:Legend
.: :MODERATE::2013-03-06:2013-03-06:Legend
.: :SEVERE::2013-03-06:2013-03-06:Legend
1:DIZZINESS:MODERATE:2013-03-06:2013-03-07:
2:COUGH:MILD:2013-03-20:.:
3:APPLICATION SITE DERMATITIS:MILD:2013-03-26:2013-06-18:
4:DIZZINESS:MILD:2013-03-27:2013-03-27:
5:ELECTROCARDIOGRAM T WAVE INVERSION:MILD:2013-03-30:.:
6:DIZZINESS:MILD:2013-04-01:2013-04-11:
7:DIZZINESS:MILD:2013-04-01:2013-11-11:
8:APPLICATION SITE DERMATITIS:MODERATE:2013-03-26:2013-06-18:
9:HEADACHE:MILD:2013-05-17:2013-05-18:
10:APPLICATION SITE DERMATITIS:MODERATE:2013-03-26:2013-06-18:
11:PRURITUS:MODERATE:2013-05-27:2013-06-18:
;
run;
data _null_;
set ae0;
minday=0;
maxday= &maxdate - &mindate;
minday10 = -20;
mindate10=&mindate - 20;
call symputx('minday', minday);
call symputx('maxday', maxday);
call symputx('minday10', minday10);
run;
data ae2; set ae0;
aestdy= aestdate-&mindate+0;
aeendy= aeendate-&mindate+0;
stday=aestdy;
enday=aeendy;
if aestdy=. then do;
stday=&minday;
lcap='ARROW';
end;
if aeendy=. then do;
enday=&maxday;
hcap='ARROW';
end;
xs=0;
run;
data anno_x_values;
do x1=-20 to 100 by 10, 200, 300;
output;
end;
run;
data anno_x_values; set anno_x_values;
length label $300 x1space y1space anchor $50;
layer="front";
function="text"; textcolor="gray33"; textsize=8;
width=100; widthunit='percent';
x1space='datavalue';
y1space='wallpercent';
anchor='top';
y1=-1;
label=trim(left(x1));
run;
ods graphics / width=900px height=600px;
proc sgplot data=ae2 noautolegend nocycleattrs sganno=anno_x_values;
highlow y=aeseq low=stday high=enday / group=aesev lowlabel=aedecod type=bar
barwidth=0.8 lineattrs=(color=black) lowcap=lcap highcap=hcap name='sev';
scatter x=aestdate y=aeseq / markerattrs=(size=0);
refline 0 / axis=x lineattrs=(thickness=1 color=black);
yaxis display=(nolabel noticks novalues) type=discrete;
xaxis valueattrs=(color=white)
label='Study Days' offsetmin=0.15 offsetmax=0.02
values=(-20 to 300 by 10);
keylegend 'sev'/ title='Severity :';
run;
... View more