- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
I'm having an issue with titles and footnotes in a macro I developed using CDISC PILOT Study Data
/* Open ODS destination based on specified output type and path */
%if (%upcase(&output_type) = PDF) and (&output_path ne ) %then %do;
ods escapechar='~';
ods pdf file="&outpath./&outname..pdf"
image_dpi = 300;
%end;
%else %if (%upcase(&output_type) = RTF) and (&output_path ne ) %then %do;
ods escapechar='~';
ods rtf file = "&outpath./&outname..rtf"
image_dpi = 300;
%end;
/* Close ODS destination */
%if %upcase(&output_type) = PDF %then %do;
ods pdf close;
%end;
%else %if %upcase(&output_type) = RTF %then %do;
ods rtf close;
%end;
When I run this code I get this output
But I want the titles and footnotes outside of the image similar to the rundate on the top right. Where is it going wrong?
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
On your ODS PDF and ODS RTF statements, you can add the options nogtitle and nogfootnote. That will tell SGPLOT to add the titles outside of the graph image. It basically makes them titles for the page, instead of a title within the graph area. As an example:
ods pdf file="Q:\junk\foo.pdf" nogtitle ;
title "hello" ;
proc sgplot data=sashelp.class ;
scatter x=height y=weight ;
run ;
title;
ods pdf close ;
As a side note, when posting a question, it's helpful to post a small example of your problem. In this case, since your question is not really about macros, it would be clearer to show a little example focused on the positions of titles and footnotes.
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
On your ODS PDF and ODS RTF statements, you can add the options nogtitle and nogfootnote. That will tell SGPLOT to add the titles outside of the graph image. It basically makes them titles for the page, instead of a title within the graph area. As an example:
ods pdf file="Q:\junk\foo.pdf" nogtitle ;
title "hello" ;
proc sgplot data=sashelp.class ;
scatter x=height y=weight ;
run ;
title;
ods pdf close ;
As a side note, when posting a question, it's helpful to post a small example of your problem. In this case, since your question is not really about macros, it would be clearer to show a little example focused on the positions of titles and footnotes.
Next up: SAS Trivia Quiz hosted by SAS on Wednesday May 21.
Register now at https://www.basug.org/events.
- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Perfect thanks very much @Quentin nogfootnote nogtitle worked great!. Yes, I will be more specific about the exact root of my issue next time. Appreciate your time!.