BookmarkSubscribeRSS Feed
Giampaolo
Obsidian | Level 7

Dear SAS users,

I have divided a population of patients into quartiles of blood glucose and used a bar graph to represent the frequency of each quartiles among three groups of patients. The quartile progression from low to high is visualized by a progressively darkening color  (two color ramp).

I need now to visualize quartiles from  groups of this population using a different color for each group. The different colors are to clarify that it's the group, not the population, that has been divided into quartiles.  As of now all groups have the same color progression. I posted an example of two group quintiles from white to gray. How can I apply a different color ramp to the two groups?

Thank you!

 

My code is:

proc sgplot data = rankpergroup noautolegend ;
VBARPARM CATEGORY= CDM   response = PCT_ROW/ CLUSTERWIDTH= 0.7
group= q_G groupdisplay=cluster
colorresponse=q_G colormodel=twocolorramp;
xaxis label= 'Quartile of TWM Glucose' labelattrs= (size=14) VALUEATTRS =(size=14);
yaxis label = 'Patients (%)' labelattrs= (size=14) labelpos= center VALUEATTRS =(size=14);
run;

SAS Innovate 2025: Save the Date

 SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!

Save the date!

Tips for filtering data sources in SAS Visual Analytics

See how to use one filter for multiple data sources by mapping your data from SAS’ Alexandria McCall.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 0 replies
  • 434 views
  • 0 likes
  • 1 in conversation