I am trying to use PROC SGPLOT with the following dataset. Currently with my script the x-axis goes from 1-52. I want the x-axis to start with week 35 and continue through week 52, then follow with weeks 1 to 34. Any assistance would be greatly appreciated.
data original_data; infile datalines dlm="," dsd; input Surveillance_Week $ weekly_count_curryr rolling_avg_prevyr; datalines; 35,15,7 36,11,5.7 37,,8.3 38,,9.7 39,,13.7 40,,15.3 41,,20 42,,24 43,,27 44,,27.7 45,,29.7 46,,32 47,,33 48,,30 49,,27.7 50,,24 51,,21 52,,15.3 53,,9.7 01,,13.7 02,,20 03,,18 04,,17 05,,14.3 06,,15.7 07,,14.7 08,,12.3 09,,10.7 10,,9.3 11,,11 12,,10.7 13,,10.3 14,,10.7 15,,11.3 16,,13.3 17,,13 18,,12.3 19,,9.7 20,,7.7 21,,7.3 22,,8.7 23,,7.3 24,,9 25,,8.7 26,,11.7 27,,10 28,,7.7 29,,5.3 30,,4.3 31,,6 32,,8.3 33,,7.3 34,,5.3 ; run;
proc sgplot data=comb_adjusted; where serial_num >= 3; vbar adjusted_week / response=weekly_count_curryr datalabel barwidth=0.8 fillattrs=(color=green); vline adjusted_week / response=rolling_avg_prevyr lineattrs=(color=blue thickness=3); xaxis label="Surveillance Week"; /* No grid option here removes vertical lines */ yaxis label="count" grid; /* Keeps horizontal grid lines */ keylegend / position=topright across=1; run;
... View more