hello,
is it possible to put 2 differents titles, one for hearder (rtf file) and one for the graph.
because before the proc sgplot I put this Title 'Title for the hearder' ;
and by specifying the ODS RTF option "NOGTITLE" , I succed to obtain the header title in the hearder.
But after that , I put another title Title 'Title for the graph' ;inside the proc sgplot and this replace the previous. I would like to display the 2 titles.
thanks in advance for your help
Nasser
Here is one way to put a title in the graph and another one outside the graph.
proc sgplot data=sashelp.class tmplout='t';
title 'Weight and Height by Sex';
reg y=weight x=height / group=sex;
run;
%inc 't';
title 'Page Title';
ods rtf file='b.rtf';
proc sgrender data=sashelp.class template=sgplot;
run;
ods rtf close;
Here is one way to put a title in the graph and another one outside the graph.
proc sgplot data=sashelp.class tmplout='t';
title 'Weight and Height by Sex';
reg y=weight x=height / group=sex;
run;
%inc 't';
title 'Page Title';
ods rtf file='b.rtf';
proc sgrender data=sashelp.class template=sgplot;
run;
ods rtf close;
I think you could use PROC DOCUMENT too, but I need to run to a meeting now, so I don't have time to investigate right now.
Here is a more direct way, but it is not supported in RTF.
title;
ods html file='b.html';
ods layout gridded;
ods region;
title "Page Title" ;
ods region;
proc sgplot data=sashelp.class tmplout='t';
title 'Weight and Height by Sex';
reg y=weight x=height / group=sex;
run;
ods layout end;
ods html close;
Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.
Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.
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.