BookmarkSubscribeRSS Feed
deleted_user
Not applicable
I'm usinig GPlot to create two plots with a title above. Is there a way to shrink the distance between the title and the graph? Code below for anyone who wants it all. Thanks!

Jeff


%macro anatomical(region=,label=,horig=,vorig=);
%put in anatomical, inputfile = INPT;
goptions hsize=2.175in
vsize=1.775in
horigin=&horig.in
vorigin=&vorig.in;

axis3 value=(color=black font="Helvetica" height=7pt)
label = none
order=(.1 1 10 100 1000)
logbase=10
logstyle=expand
major=none
minor=none
offset = (1);

legend1 label=none
across=1
position=(top inside left)
order=('Women' 'Men')
value=(tick=1 height=8pt font="Helvetica" color=black 'Women'
tick=2 height=8pt font="Helvetica" color=black 'Men' )
shape=symbol(10,5)
mode=share;

PROC gplot DATA=R110097.INPT_fig2_graphs gout=mycat;
format sex $sex. agegrp $agegrp1_.;
plot &region*agegrp=sex /autovref
autohref
chref=black
cvref=black
lvref=20
lhref=20
vaxis=axis3
haxis=axis4
noframe
%if &region = infectious_r %then
legend=legend1;
%else
nolegend;
;
title1 justify=l f="Helvetica" height=9pt "&label";
run;
quit;
%mend anatomical;

%anatomical(region=infectious_r ,label=Infectious,horig=.03, vorig=8.5);
3 REPLIES 3
Bill
Quartz | Level 8
you could add the move=(x,y) option to the title statement ...
deleted_user
Not applicable
Move= works! Now I just have to get a decision on how far to move it. 🙂

Thanks!
Jeff
Dorota_Jarosz
Obsidian | Level 7
You can move the title by suppressing title1 (and title2), e.g.:
title1;
title2 justify=l f="Helvetica" height=9pt "&label";

You can try to control the distance by specifying larger height for title1 and empty title " " if size alone won't work.
title1 h=12 " ";
title2 justify=l f="Helvetica" height=9pt "&label";
I often use alternate titles.

SAS Innovate 2025: Call for Content

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!

Submit your idea!

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
  • 1575 views
  • 1 like
  • 3 in conversation