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-white.png

🚨 Early Bird Rate Extended!

Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.

 

Lock in the best rate now before the price increases on April 1.

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