I'm having trouble reducing the space between the top of my bar graph and the title. I have 6 graphs per page, and the move= statement (if that's the solution) is stumping me. I added "move=(0,-1) but that squished the size of table. I only need to remove about 0.5 inches of blank space. Below is my code for graph 1 of 6 (page title omitted):
goptions horigin=0 vorigin=6.75 hsize=3 vsize=3 htext=7pt htitle=9pt ftitle="bold" ;
axis1 label=(a=90 f="Albany AMT" "Frequency") order=(0 to 140 by 20) minor=none;
axis2 label=none value=none;
axis3 label=none ;
legend1
label=("Response" h=2 pt position=left j=c)
position=(top inside left) mode=share
value=(h=5 pt 'Yes' 'No');
pattern1 v=solid color=CX93BFBF;
pattern2 v=solid color=CX4791ED;
proc gchart data=griffin_collapsed_values;
vbar discuss_pay/DISCRETE
INSIDE=PERCENT
GROUP=gender
SUBGROUP=discuss_pay
RAXIS=axis1
maxis=axis2
gaxis=axis3
legend=legend1
space=0
width=6
coutline=white;
where discuss_pay ne . and gender le 2;
format gender genderf. discuss_pay yesno.;
title1 "Gender" f="bold" ;
footnote1 j=c h=.75 f=Albany "Figure 1a. &chi1a";
run;
quit;
You may want to consider moving to SGplot or SGpanel. The space between the titles and graphs is less and since you say you are attempting to put 6 charts to a page then, depending on your data, SGPanel may be a good option. Also the development by SAS is going towards the SG procedures.
Code without example data is hard to test.
Which destination are you sending this to? HTML, RTF, PDF and others may require different approaches. Also there are options related to destinations that specifically affect graph titles.
Which is your currently active ODS Style?
PDF - Here's the preceeding code:
GOPTIONS RESET=ALL ftext="Albany AMT";
ods pdf file="\\vmware-host\Shared Folders\Documents\My Documents\\test3.pdf" startpage=never ;
goptions htitle=11pt;
options nodate nonumber;
options leftmargin=1in rightmargin=1in;
proc gslide;
title1 'Q1: Did the medical team discuss payment with you?' lspace=.5in f="bold";
run;quit;
And thank you for your help!
You may want to consider moving to SGplot or SGpanel. The space between the titles and graphs is less and since you say you are attempting to put 6 charts to a page then, depending on your data, SGPanel may be a good option. Also the development by SAS is going towards the SG procedures.
SAS Innovate 2025 is scheduled for May 6-9 in Orlando, FL. Sign up to be first to learn about the agenda and registration!
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.
Ready to level-up your skills? Choose your own adventure.