Hi,
I am making a small plot that is inset in the upper left corner of a larger main plot (using GTL in v9.3).
I want the inset plot to be immediately next to the wall of the main plot and I have specified haling = top and valign = left and pad = 0px. The left side of the inset plot is right against the left wall of the main plot, but there is still a space between the top of the inset plot and the top of the main plot wall (result attached). How can I make this space go away?
Here is an excerpt of the code:
PROC TEMPLATE; DEFINE STATGRAPH equated; BEGINGRAPH /
designheight = 10.5in DESIGNWIDTH = 7.5in;
layout lattice /
rowgutter = 8 columngutter = 8
columns = 2 rows = 3;
layout gridded / border = false;
endlayout;
column2headers; entry 'Plot 1' /
textattrs = (family= "Times New Roman" size = 12pt); endcolumn2headers;
*Plot1;
LAYOUT overlayequated / commonaxisopts = (viewmin = 0 viewmax = 88 tickvaluelist = (0 22 44 66 88)) equatetype = square
YAXISOPTS = (display = (ticks tickvalues) tickvalueattrs = (family= "Times New Roman" size = 10pt))
XAXISOPTS = (DISPLAY = (ticks tickvalues) tickvalueattrs = (family = "Times New Roman" size = 10pt));
SCATTERPLOT X = isoline_mean_1 Y= Y_mean1 /
markerattrs = (size = 0.8pt) GROUP = entry includemissinggroup = false;
LINEPARM X=0 Y=0 SLOPE=1 / LINEATTRS = (COLOR = gray);
*Plot1 Inset;
LAYOUT overlayequated / commonaxisopts = (viewmin = -0.1 viewmax = 1.4 tickvaluelist = (-0.1 0.4 0.9 1.4))
equatetype = square WIDTH = 18pct HEIGHT = 18pct
PAD = (LEFT = 0px top = 0px RIGHT = 0px) halign = left valign = top
YAXISOPTS = (DISPLAY = (ticks tickvalues) tickvalueattrs = (family = "Times New Roman" size = 8pt))
XAXISOPTS = (DISPLAY =(ticks tickvalues) tickvalueattrs = (family = "Times New Roman" size = 8pt));
SCATTERPLOT X = isoline_mean_log10_1 Y = Y_mean_log10_1 /
markerattrs = (size = 0.6pt color = black) GROUP = entry includemissinggroup = false;
entry 'Plot 1 Inset'/ autoalign = (topleft) pad = (top = 0px left = 0px)
textattrs = (size = 8pt weight = normal family = "Times New Roman");
LINEPARM X = 0 Y = 0 SLOPE = 1 / LINEATTRS = (COLOR = gray);
endlayout;
endlayout;
To reduce padding of embedded layout, try OUTERPAD instead of PAD.
Also, you can turn ON the layout border to see how big the inner cell really is.
It is not clear why you are using a 2x3 Lattice, and also a Layout Gridded.
To reduce padding of embedded layout, try OUTERPAD instead of PAD.
Also, you can turn ON the layout border to see how big the inner cell really is.
It is not clear why you are using a 2x3 Lattice, and also a Layout Gridded.
Catch the best of SAS Innovate 2025 — anytime, anywhere. Stream powerful keynotes, real-world demos, and game-changing insights from the world’s leading data and AI minds.
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.