SAS 在图表底部和脚注之间添加白色 space

SAS adding white space between the bottom of a graph and the footnote

希望对你有所帮助。我想减少 SAS 在图表底部和脚注之间添加的白色 space 的数量。我将图表生成为 .pdf 文件,这些文件需要满足最小边距(我在选项声明中指定)和左对齐标题和脚注方面的特定要求。随着添加更多的标题和页脚,白色 space 的数量似乎不成比例地增加。我还想延长图表的左右长度。 我已经尝试在 ods 图形语句中使用宽度和高度选项以及其他许多东西。
使用下面的 sashelp.esno 的代码。任何见解表示赞赏。

options nodate nonumber pageno=1 pagesize=43 linesize=108 orientation=landscape papersize=LETTER LEFTMARGIN=0.87in RIGHTMARGIN=0.87in TOPMARGIN=1.25in BOTTOMMARGIN=1.25in;

/*Note: US letter measures 8.5 by 11.0 inches (215.9 by 279.4 mm). */
ods graphics off;
run;
ods _all_ close;
ods graphics  on / reset=all width=9in height=4.9in border=off;
ods PDF file="C:\Users\YourNameHere\Documents\ElNino.PDF" nogtitle nogfootnote bookmarkgen=NO;
title1 j=l height=10pt "Report number" ;
title2 j=l height=10pt "Figure number" ;
title3 height=10pt "El Nino Southern Oscillation";
title4 height=10pt "Observation station X";
footnote1  height=10pt "footnote1: it is the space above here that I would like to reduce" ;
footnote2 j=L height=10pt "footnote 2 width=9in height=4.9in";

proc sgplot data=sashelp.enso;
    series x = month y= pressure;
    refline 10 / axis = y label = "10" lineattrs=(color=red);
run;

ods graphics off;
run;
ods _all_ close;

更新:Richard 分享的 SAS 知识库文章包含一个有用的解决方法。 http://support.sas.com/kb/55/923.html。这是改编后的代码:

ods graphics off;
run;
ods _all_ close;
options nodate nonumber pageno=1 pagesize=43 linesize=108 orientation=landscape papersize=LETTER LEFTMARGIN=0.87in RIGHTMARGIN=0.87in TOPMARGIN=1.25in BOTTOMMARGIN=1.25in;
ods pdf file="C:\Users\YourNameHere\Documents\ElNino2.PDF" nogfootnote nogtitle notoc;

title1 j=l height=10pt "Report number" ;
title2 j=l height=10pt "Figure number" ;
title3 height=10pt "El Nino Southern Oscillation";
title4 height=10pt "Observation station X";
footnote1  height=10pt "footnote1: The space above here is now much reduced" ;
footnote2 j=L height=10pt "footnote 2 some more details here";

/* Insert a blank row with TEXT= and eliminate the page
    break this statement generates by setting STARTPAGE=NO. */
ods pdf text=" " startpage=no;
ods graphics on / reset border=off height=4in width=7in;

proc sgplot data=sashelp.enso;
    series x = month y= pressure;
    refline 10 / axis = y label = "10" lineattrs=(color=red);
run;


/* If more pages follow, uncomment the folllowing code to   */
/* reset the STARTPAGE= option to its default value of YES. */
/*ods pdf startpage=yes;*/

ods pdf close;
ods graphics off;
run;
ods _all_ close;

这是一个已知问题:

Problem Note 55923: ODS GRAPHICS statement HEIGHT= or WIDTH= values might be ignored in ODS PDF destination output