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: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 421 views
  • 0 likes
  • 1 in conversation