I have a dataset with case ID, classification status, disease, and symptom onset date. I want to create a graph where the x axis is onset date and the y axis is the number of cases with that onset date. I can manage to get a graph with the code below, but i want to include dates on the x axis even if there are no cases with that onset date. proc sgplot data=cases; vbar onset / group=classification_status; xaxis label='Onset Date'; yaxis label='Number of Cases'; where disease='MEAS' and classification_status in ('CONFIRMED','DISCARD') and onset>19758 and onset<19800; format onset mmddyy8.; run; I have also been able to use proc univariate to display a graph that includes onset dates with 0 cases, but I am unable to use a group statement to color the bars according to classification status. proc univariate data=cases plot noprint; var onset; where disease='MEAS' and classification_status in ('CONFIRMED','DISCARD') and onset>19758 and onset<19900; format onset mmddyy8.; histogram / noframe vscale=count midpoints= 19759, 19760, 19761, 19762, 19763,...etc...19800; run; so the first graph the first graph shows groups with different colors and the second graph shows dates with 0 counts. i want to have both in 1 chart! also would like to extend the x axis or rotate the labels so the dates aren't all squished together. i would appreciate any suggestions. thanks!
... View more