Hello Experts,
I am displaying graph on pdf using the proc sgplot procedure.
The graph gets displayed but the title and footnote are not getting displayed on the pdf.
ods listing close;
ods pdf file="pdffile.pdf";
title1 "Title1";
title2 "Title2";
footnote1 "FT1";
footnote2 "FT2";
proc sgplot data=sashelp.class;
y2axis min=0;
vbar age / response=height datalabel;
vline age / response=weight y2axis datalabel;
run;
ods pdf close;
ods listing;
Am I missing something here?
If footnotes and title you want to display within graph area then by changing the position of title and footnote,means writing before ods statement you can display them within pdf file. please mention detail if this will not work.
Hi:
Another possibility is to explicitly invoke the GTITLE and GFOOTNOTE options. Starting with SAS 9.3, you can use:
ods pdf file='xxx.pdf' gtitle gfootnote;
which will put the titles and footnotes INSIDE the boundary of the graph image. Otherwise, NOGTITLE and NOGFOOTNOTE cause the titles and footnotes to be OUTSIDE the graph image and placed under the control of ODS PDF.
If you do not have SAS 9.3 and/or, you are still not able to see your titles or footnotes, then I suggest you open a track with Tech Support. I ran your code in SAS 9.3 and see all the titles and all the footnotes inside the graph image in my output.
cynthia
This was the same output which i was able to display by changing the position of title and footnote working with SAS9.2. please try it out with your code.
and if you have 9.3 then those options will be the better choice to use.
@Cynthia_sas wrote:
Starting with SAS 9.3, you can use:
ods pdf file='xxx.pdf' gtitle gfootnote;
Cynthia,
Can we use GTITLE and GFOOTNOTE with ODS LISTING, as I'd like to be able to force titles and footnotes into free-standing PNG files too?
...........Phil
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!
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.