BookmarkSubscribeRSS Feed
dagremu
Obsidian | Level 7

I'm creating a multi-panel layout using GTL and the lattice layout, and I'm trying to completely remove any gap between plot areas of the panels. However, there's a sliver of space on the left side of each panel that I can't figure out how to get rid of. Here's a very simple example to demonstrate what I mean:

 

proc template;
	define statgraph customGraph;
	begingraph / backgroundColor=pink;
	layout lattice / columns=2 rowdatarange=union pad=0 columngutter=0;

		layout overlay / wallDisplay=(fill) pad=0 outerpad=0 border=true borderAttrs=(color=blue);
			histogram height;
		endlayout;
		layout overlay / wallDisplay=(fill) pad=0 outerpad=0 border=true borderAttrs=(color=blue);
			histogram weight;
		endlayout;

		rowaxes;
			rowaxis;
		endrowaxes;

	endlayout;
	endgraph;
	end;
run;

ods graphics / width=4in height=2in;
proc sgrender data=sashelp.class template=customGraph;
run;

And here's the output. I added the blue border just to make it clear what's going on:

 

Gap between plots.png

 

As you can see, technically there's no gap between the panels because the blue borders in the middle line up. What I'm referring to though is the gap between the "data areas" of the panels, i.e., there's still a sliver of pink space between the white areas, and I want it gone!

 

Any idea how to remove that left edge within each panel? I've tried messing with all the pad options I could find. Thanks for any help.

 

P.S. I'm using SAS 9.4M3.

1 REPLY 1
hollandnumerics
Lapis Lazuli | Level 10

Hi dagremo,

 

I've tried using THRESHOLDMIN=0, OFFSETMIN=0 and OUTERPAD=0, but they only seem to affect the white space in the panels, not the pink space:

 

proc template;
	define statgraph customGraph_phil;
	begingraph / backgroundColor=pink;
	layout lattice / columns=2 rowdatarange=union pad=0 columngutter=0
	                 OUTERPAD=0 HALIGN=LEFT
                     ;

		layout overlay / wallDisplay=(fill) pad=0 outerpad=0 border=true borderAttrs=(color=blue)
		                 OUTERPAD=0 PAD=0
		                 XAXISOPTS=(LINEAROPTS=(THRESHOLDMIN=0 THRESHOLDMAX=0)
						            OFFSETMIN=0 OFFSETMAX=0
                                   )
                         ;
			histogram height;
		endlayout;
		layout overlay / wallDisplay=(fill) pad=0 outerpad=0 border=true borderAttrs=(color=blue)
		                 OUTERPAD=0 PAD=0
		                 XAXISOPTS=(LINEAROPTS=(THRESHOLDMIN=0 THRESHOLDMAX=0)
						            OFFSETMIN=0 OFFSETMAX=0
                                   )
                         ;
			histogram weight;
		endlayout;

		rowaxes;
			rowaxis;
		endrowaxes;

	endlayout;
	endgraph;
	end;
run;

ods graphics / width=4in height=2in;
proc sgrender data=sashelp.class template=customGraph_phil;
run;

GTL_lattice.png

I'm using SAS 9.4M6, so maybe what you are trying to do is not yet possible!

 

.............Phil

Philip R Holland
Recent book (see my blog site): "SAS Programming Experiences: A How-To Guide from a Power SAS User"

sas-innovate-white.png

Special offer for SAS Communities members

Save $250 on SAS Innovate and get a free advance copy of the new SAS For Dummies book! Use the code "SASforDummies" to register. Don't miss out, May 6-9, in Orlando, Florida.

 

View the full agenda.

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.

SAS Training: Just a Click Away

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

Browse our catalog!

Discussion stats
  • 1 reply
  • 1517 views
  • 1 like
  • 2 in conversation