BookmarkSubscribeRSS Feed
SASuserlot
Barite | Level 11

I am learning PROC TEMPLATE, I am trying to place two graphs in one page.  I am placing two issues.

 

1. I would like to avoid the border around the both graphs so that it looks  like one Image. I tried turning off the borders.


 data orci;
 input effect$ OR LCL UCL;
 cards;
 AGE 1.05 1.01 1.09
 BEC 1.00 0.98 1.02
 IVHX 0.70 0.54 0.89
 DRUTX 0.94 0.90 0.99
 RACE 1.26 0.81 1.95
 TREAT 1.54 1.04 2.27
 SITE 1.13 0.74 1.72
 ;
 RUN;
 data orci;
 set orci;
 or1= round(or,0.1);
 lcl1= round(lcl,0.1);
 ucl1= round(ucl,0.1);
 run;

 
ods path(prepend) work.templat(update);
ods graphics on/border=off;
proc template;
	define statgraph forest;
		begingraph/BORDER=off;
			layout lattice / columns = 2  rowgutter=10 columngutter=10;
	cell;
	cellheader;
	endcellheader;
		layout overlay / xaxisopts=(label='xxI' linearopts=( viewmin=0 viewmax=2))
 			yaxisopts=(label='xx');
 			scatterplot x=OR1 y=EFFECT / xerrorlower= LCL1	 xerrorupper= ucl1
 			markerattrs=  (symbol=circlefilled  COLOR=red size=8);
		 referenceline x=1 ;
	endlayout;
	endcell;

	cell;
	cellheader;
	endcellheader;
		layout overlay / xaxisopts=(label='xxI' linearopts=( viewmin=0 viewmax=2))
 			yaxisopts=(label='xx');
 			scatterplot x=OR1 y=EFFECT / xerrorlower= LCL1	 xerrorupper= ucl1
 			markerattrs=  (symbol=circlefilled  COLOR=green size=8);
		 referenceline x=1 ;
	endlayout;
	endlayout;
	endcell;
endgraph;
end;
run;

ods graphics on/ width= 8in height= 4in border=off   ;
options orientation = landscape errors = 2 missing = ' ' nofmterr ls = 175 validvarname = upcase nofmterr nobyline 
noquotelenmax ;
ods results on; 
ods listing close; 
ods rtf file = "\Graphs\xx.rtf"
						nogtitle nogfootnote;
proc sgrender data=orci template="forest";
run; 
ods _all_ close;
ods graphics off;

This is the output I am getting.

SASuserlot_0-1639245474730.png

 

1 REPLY 1
JosvanderVelden
SAS Super FREQ

I'm not sure what you intend to do.
Can you clarify what you mean 'border'? For instance by indicating in the image which 'border' you would like to remove.

sas-innovate-white.png

Missed SAS Innovate in Orlando?

Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.

 

Register now

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
  • 1 reply
  • 902 views
  • 0 likes
  • 2 in conversation