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