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.

hackathon24-white-horiz.png

The 2025 SAS Hackathon Kicks Off on June 11!

Watch the live Hackathon Kickoff to get all the essential information about the SAS Hackathon—including how to join, how to participate, and expert tips for success.

YouTube LinkedIn

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 1994 views
  • 1 like
  • 3 in conversation