Hi, I am trying to plot a lasagne plot adapting a published code. I am not sure how I can fix the error for the following part of the code. The warning message says: "WARNING: The blockplot statement will not be drawn because one or more of the required arguments were not supplied." and it is written five times. Any help is appreciated. Thank you. Befikadu /*create chart definition using GTL*/
proc template;
define statgraph blockplot2;
begingraph;
entrytitle "1921-26 Cohort - Diabetes";
legendItem type=fill name="Yes" /
fillattrs=(color=cxaa88bb )
label="Yes" ;
legendItem type=fill name="No" /
fillattrs=(color=cxaaddcc )
label="No" ;
legendItem type=fill name="Deceased" /
fillattrs=(color=cx662277 )
label="Deceased " ;
layout lattice / columns=1 rowweights=(.10 .75 .10 .05) columndatarange=union;
COLUMNAXES;
columnaxis / display=none ;
endcolumnaxes;
blockplot x=survey block=percent2 / class=smkstat
includemissingclass=false
display=(values label outline) valuehalign=center
labelattrs=GraphDataText valueattrs=GraphDataText;
barchart x=survey y=percent / group=smkstr orient=vertical display=(fill) index=indexn;
blockplot x=survey block=atext / class=alabel
includemissingclass=false
display=(values) valuehalign=center
labelattrs=GraphDataText valueattrs=GraphDataText;
discretelegend "Yes" "No" "Deceased" / border=false;
endlayout;
endgraph;
end;
run;
/* format for smoking status */
proc format;
value smk
0='No'
1='Yes'
2='Deceased';
title ;
/* create graph */
ods listing close;
ods rtf file='old_DB_stat.rtf' style=newchart;
proc sgrender data=allsmk template=blockplot2 ;
format smkstat smk. ;
run;
ods rtf close;
ods listing;
... View more