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
Rhodochrosite | Level 12

 

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
Rhodochrosite | Level 12

 

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
Rhodochrosite | Level 12

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
Rhodochrosite | Level 12

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-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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
  • 2831 views
  • 0 likes
  • 2 in conversation