BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Cruise
Ammonite | Level 13

Hi Folks:

 

Any idea how to eliminate empty space before 0 on the x-axis as shown in the black box in the image below? I have a big  4 by 4 panel plot and eliminating empty space from each panel would help reduce the size of the plot quite bit.

 

plot_white_space.png

ods graphics/width=14.5 in height=10in;
proc sgpanel data=four1;
panelby SORT/ novarname columns=4 rows=4;
styleattrs DATACONTRASTCOLORS=(BLUE GREEN RED);
series  x=FU y=cr/lineattrs=(pattern=solid thickness=2) GROUP=STAGE NAME='KEY'; 
scatter x=FU y=y2/markerattrs=(size=0) datalabel=y2 DATALABELPOS=BOTTOM;
colaxis label='label' min=1 max=100 grid values=(0 to 60 by 5);
rowaxis label='label' refticks=(values) fitpolicy=thin grid  values=(0 to 1 by 0.01);
keylegend 'KEY'/  title="categories" position=top;
/*INSET N/position=TOPRIGHT;*/
FORMAT y2 5.2; 
title ' ';
run;

 

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @Cruise,

 

Use the OFFSETMIN= option of the COLAXIS statement: Its value (between 0 and 1) determines that "empty space before 0," so zero would be optimal in terms of space saving:

colaxis label='label' min=1 max=100 grid values=(0 to 60 by 5) offsetmin=0;

There's a similar option OFFSETMAX= for the other end of the axis and both options are available for the ROWAXIS statement, too.

View solution in original post

4 REPLIES 4
VDD
Ammonite | Level 13 VDD
Ammonite | Level 13

colaxis label='label' min=1 max=100 grid values=(1 to 60 by 5);

Cruise
Ammonite | Level 13
Thanks for your response. But it didn't remove the empty space.
FreelanceReinh
Jade | Level 19

Hi @Cruise,

 

Use the OFFSETMIN= option of the COLAXIS statement: Its value (between 0 and 1) determines that "empty space before 0," so zero would be optimal in terms of space saving:

colaxis label='label' min=1 max=100 grid values=(0 to 60 by 5) offsetmin=0;

There's a similar option OFFSETMAX= for the other end of the axis and both options are available for the ROWAXIS statement, too.

Cruise
Ammonite | Level 13
Perfect! no white space now leaving my plot more compact. Thanks!

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 25. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 4 replies
  • 2285 views
  • 2 likes
  • 3 in conversation