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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

Register now!

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