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;

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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.

Click image to register for webinarClick image to register for webinar

Classroom Training Available!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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