Is there a way to get the Y axis label in the top figure to move closer to the tick labels. I get why it is positioned this way because of the tick values in the bottom figure. I'm using GTL.
John.King ,
That would be better if you could post some data and your GTL code to test your problem.
Here I make some dummy code to give you some help.
%sganno data sganno; %SGTEXT(LABEL="Monophasic (11pts)",WIDTH=40,DRAWSPACE="LAYOUTPERCENT",ID="BAR",ROTATE=90,X1=15,Y1=30) run; proc template; define statgraph y2axis; begingraph; layout lattice / rows=2 rowgutter=10 rowdatarange=union row2datarange=union; layout overlay / yaxisopts=( label=" " ) ; histogram height / scale=count ; histogram height / scale=percent; densityplot height / normal(); annotate / id="BAR"; endlayout; layout overlay / yaxisopts=( label=" " ) ; scatterplot y=smoking_Status x=weight; endlayout; endlayout; endgraph; end; proc sgrender data=sashelp.heart template=y2axis sganno=sganno; run;
Look at annotation to place text at arbitrary locations. Start here for some details: https://documentation.sas.com/doc/en/pgmsascdc/v_057/grstatgraph/p0rgjcddtqwpyin1ro3kvrksd6js.htm
Without data and complete template code I wouldn't even make an attempt at some other work around as there are just too many moving parts with GTL to have a chance of getting a working alternative.
John.King ,
That would be better if you could post some data and your GTL code to test your problem.
Here I make some dummy code to give you some help.
%sganno data sganno; %SGTEXT(LABEL="Monophasic (11pts)",WIDTH=40,DRAWSPACE="LAYOUTPERCENT",ID="BAR",ROTATE=90,X1=15,Y1=30) run; proc template; define statgraph y2axis; begingraph; layout lattice / rows=2 rowgutter=10 rowdatarange=union row2datarange=union; layout overlay / yaxisopts=( label=" " ) ; histogram height / scale=count ; histogram height / scale=percent; densityplot height / normal(); annotate / id="BAR"; endlayout; layout overlay / yaxisopts=( label=" " ) ; scatterplot y=smoking_Status x=weight; endlayout; endlayout; endgraph; end; proc sgrender data=sashelp.heart template=y2axis sganno=sganno; run;
April 27 – 30 | Gaylord Texan | Grapevine, Texas
Walk in ready to learn. Walk out ready to deliver. This is the data and AI conference you can't afford to miss.
Register now and lock in 2025 pricing—just $495!
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.