Data visualization with SAS programming

GPlot: Move title closer to graph?

Reply
N/A
Posts: 0

GPlot: Move title closer to graph?

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);
Super Contributor
Posts: 291

Re: GPlot: Move title closer to graph?

you could add the move=(x,y) option to the title statement ...
N/A
Posts: 0

Re: GPlot: Move title closer to graph?

Move= works! Now I just have to get a decision on how far to move it. Smiley Happy

Thanks!
Jeff
Contributor
Posts: 66

Re: GPlot: Move title closer to graph?

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.
Ask a Question
Discussion stats
  • 3 replies
  • 360 views
  • 1 like
  • 3 in conversation