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

Innovate_SAS_Blue.png

Registration is open! SAS is returning to Vegas for an AI and analytics experience like no other! Whether you're an executive, manager, end user or SAS partner, SAS Innovate is designed for everyone on your team. Register for just $495 by 12/31/2023.

If you are interested in speaking, there is still time to submit a session idea. More details are posted on the website. 

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.

Get the $99 certification deal.jpg

 

 

Back in the Classroom!

Select SAS Training centers are offering in-person courses. View upcoming courses for:

View all other training opportunities.

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