BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Nasser_DRMCP
Lapis Lazuli | Level 10

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

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenKuhfeld
Ammonite | Level 13

 

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

3 REPLIES 3
WarrenKuhfeld
Ammonite | Level 13

 

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; 

 

WarrenKuhfeld
Ammonite | Level 13

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.

WarrenKuhfeld
Ammonite | Level 13

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;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

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
  • 3 replies
  • 3695 views
  • 0 likes
  • 2 in conversation