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;

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
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
  • 377 views
  • 0 likes
  • 1 in conversation