BookmarkSubscribeRSS Feed
Befikadu
Fluorite | Level 6

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;

 

 

 

 

2 REPLIES 2
Reeza
Super User

To answer your question it would help if you could provide the original source, some sample data so we can run the program and/or the log that actually shows the errors. 

 

As posted it would be hard to debug. I'll move your post to the graphics forum as well, sot he relevant people can respond. 

And if you could verify your SAS version, that's important in SAS graphics as a lot has changed quickly. 

You can find the version via:

 

proc product_status;run;

Mine for example (SAS UE) shows:

For Base SAS Software ...
Custom version information: 9.4_M5

 


@Befikadu wrote:

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;

 

 

 

 


 

Jay54
Meteorite | Level 14

This can happen when all the values for the BLOCK variable are missing.  Another option is to try using a HEATMAP instead of BlockPlot.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

How to Concatenate Values

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 1108 views
  • 2 likes
  • 3 in conversation