this is my code:
/*
Yes.Switch into PROC SGPANEL to manipulate more .
*/
data have;
set sashelp.heart(obs=1000);
keep bp_status weight;
run;
proc sort data=have;by bp_status;run;
proc summary data=have ;
by bp_status;
var weight;
output out=summary n=n min=min max=max median=median mean=mean mode=mode std=std;
run;
data want;
inb=0;
merge have summary(in=inb);
by bp_status;
if not inb then call missing(n,min,max,median,mean,mode,std);
label n="maht" min="miinimum" max="maksimum" Median ="mediaan" MEAN = "keskmine" MODE = "mood" STD = "standardhälve";
run;
proc sgpanel data=want noautolegend;
panelby bp_status/layout=rowlattice novarname onepanel ROWHEADERPOS=left;
histogram weight/group=bp_status;
inset n min max Median MEAN MODE STD /border position=ne separator='=' ;
run;
Go here: https://blogs.sas.com/content/?s=histogram+color
You will find (among others) this:
Histogram with Gradient Color
By Sanjay Matange on Graphically Speaking November 30, 2015
https://blogs.sas.com/content/graphicallyspeaking/2015/11/30/7180/
BR,
Koen
/*
Yes.Switch into PROC SGPANEL to manipulate more .
*/
data have;
set sashelp.heart(obs=1000);
keep bp_status weight;
run;
proc sort data=have;by bp_status;run;
proc summary data=have ;
by bp_status;
var weight;
output out=summary n=n min=min max=max median=median mean=mean mode=mode std=std;
run;
data want;
inb=0;
merge have summary(in=inb);
by bp_status;
if not inb then call missing(n,min,max,median,mean,mode,std);
label n="maht" min="miinimum" max="maksimum" Median ="mediaan" MEAN = "keskmine" MODE = "mood" STD = "standardhälve";
run;
proc sgpanel data=want noautolegend;
panelby bp_status/layout=rowlattice novarname onepanel ROWHEADERPOS=left;
histogram weight/group=bp_status;
inset n min max Median MEAN MODE STD /border position=ne separator='=' ;
run;
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!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: