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
Pyrite | Level 9

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
Holland Numerics: Blog and Forums
http://blog.hollandnumerics.org.uk

sas-innovate-2024.png

📢

ANNOUNCEMENT

The early bird rate has been extended! Register by March 18 for just $695 - $100 off the standard rate.

 

Check out the agenda and get ready for a jam-packed event featuring workshops, super demos, breakout sessions, roundtables, inspiring keynotes and incredible networking events. 

 

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
  • 1 reply
  • 840 views
  • 1 like
  • 2 in conversation