Hi All,
I have data which looks something like table below. I need to create a bar plot where bars are grouped by cohorts. For example : Cohort 1 and then one bar for each of the timepoint (visitlbl) and then cohort 2 and then one bar for each of the timepoint again. I ran code below but just stacking cohort on top of each other. Any ideas ?
proc sgplot data=xyz noborder;
vbarparm category=visitlbl response=avg /group = cohort datalabel /*group=cohort colorresponse=visitlbl*/;
xaxis display=(nolabel );
keylegend / noborder;
run;
title;
| COHORT | CONDITION | VISITLBL | Avg | |
| 1 | 4h | Pre-Dose | 0.9 | |
| 1 | 4h | End of Infusion | 1.7 | |
| 1 | 4h | 1h-Post Infusion | 1.9 | |
| 1 | 4h | D2 | 0.7 | |
| 1 | 4h | D3 | 0.9 | |
| 2 | 4h | Pre-Dose | 0.9 | |
| 2 | 4h | End of Infusion | 2.1 | |
| 2 | 4h | 1h-Post Infusion | 3.2 | |
| 2 | 4h | D2 | 0.7 | |
| 2 | 4h | D3 | 0.9 | |
Thank Reeza
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
Still thinking about your presentation idea? The submission deadline has been extended to Friday, Nov. 14, at 11:59 p.m. ET.
Learn how use the CAT functions in SAS to join values from multiple variables into a single value.
Find more tutorials on the SAS Users YouTube channel.
Ready to level-up your skills? Choose your own adventure.