Hi, My data looks like this: patient_id start_date _name_ _label_ col1 level 1 16/01/2021 level1 level1 1 1 2 17/05/2020 level3 level3 1 3 3 21/02/2021 level1 level1 1 1 4 15/05/2020 level3 level3 1 3 5 13/06/2020 level3 level3 1 3 6 28/03/2020 level3 level3 1 3 I created a stacked histogram using this code: proc sgplot data=level_data; histogram start_date/ group=level; Each line is a patient with a date and a level. The histogram shows: x=start_date, y=number of patients, with stacks for each level (1 to 4) (see document). I have 2 problems: 1) Since my data is sorted by patient_ID and start_date, the stacks are in this order, from up to down: 1-3-2-4. I would like them to show up as, from up to down : 4-3-2-1. I have tried sorting the data by level but it doesn't give me the result I expect on the graph. 2) For x=April on the graph, the level1 group shows 95 patients, which I have confirmed in my data. However, the stack's height is obviously out of proportion ( too short), compared to the other groups levels of the same month. Why is that? I have tried increasing the y axis scale to 300, but the visual proportion of this group doesn't change. Thank you
... View more