The SAS Output Delivery System and reporting techniques

sgplot one header title ans one graph title

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 75
Accepted Solution

sgplot one header title ans one graph title

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


Accepted Solutions
Solution
‎08-10-2017 10:30 AM
SAS Super FREQ
Posts: 291

Re: sgplot one header title ans one graph title

Posted in reply to Nasser_alfea

 

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; 

 

View solution in original post


All Replies
Solution
‎08-10-2017 10:30 AM
SAS Super FREQ
Posts: 291

Re: sgplot one header title ans one graph title

Posted in reply to Nasser_alfea

 

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; 

 

SAS Super FREQ
Posts: 291

Re: sgplot one header title ans one graph title

Posted in reply to WarrenKuhfeld

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.

SAS Super FREQ
Posts: 291

Re: sgplot one header title ans one graph title

Posted in reply to WarrenKuhfeld

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;
☑ This topic is solved.

Need further help from the community? Please ask a new question.

Discussion stats
  • 3 replies
  • 219 views
  • 0 likes
  • 2 in conversation