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

Hi there,

 

I'd like to remove blank between YAXIS and bars in below waterfall plot.

Does anyone can provide a solution? Thanks!

 

Below is my waterfall template code:

 

 

proc template;
  define statgraph waterfall;
	begingraph / drawspace=datavalue;

	layout lattice / rows=1 columns=3 columnweights=(0.15 0.7 0.15) columngutter=0;

	  /****************************************************************************/
	  layout overlay;
	  entry textattrs=(color=white size=7) "blank";
	  endlayout;
	  /****************************************************************************/

	  layout overlay / walldisplay=none

      xaxisopts = (label="xxx" 
                   labelattrs=(size=7) 
                   display=(label)
                   linearopts = (viewmin=1 viewmax=101
                                 tickvaluesequence = (start=1 end=101 increment=1)))


	  yaxisopts = (label="xxx"
                   labelattrs=(size=7) tickvalueattrs=(size=7) 
                   linearopts = (viewmin=-100 viewmax=100 
                                 tickvaluesequence = (start=-100 end=100 increment=10)));


      * barchart for waterfall;

	  barchart x=obs y=avaln / group=trt orient=vertical barwidth=0.75 name='a';

	  discretelegend 'a' 	 /location=outside halign=center valign=bottom 
							  displayclipped=true  sortorder=ascendingformatted
							  order=rowmajor  across=3;



      * horizontal reference lines;

      referenceline y=20  / lineattrs = (color=black thickness=3 pattern=shortdash);
      referenceline y=-30 / lineattrs = (color=black thickness=3 pattern=shortdash);
	  

      endlayout;

	  /****************************************************************************/
	  layout overlay;
      entry textattrs=(color=white size=7) "blank";
   	  endlayout;
	  /****************************************************************************/
		   
	endlayout;


	endgraph;
  end;
run;

 

 

Here is the result, I'd like to remove the blank under the red arrow.

 

Capture.PNG

1 ACCEPTED SOLUTION

Accepted Solutions
FreelanceReinh
Jade | Level 19

Hi @Coooooo_Lee,

 

Add

offsetmin=0

to the x-axis specifications, e.g., between "display=..." and "linearopts = ...". (See Axis Offsets.)

View solution in original post

2 REPLIES 2
FreelanceReinh
Jade | Level 19

Hi @Coooooo_Lee,

 

Add

offsetmin=0

to the x-axis specifications, e.g., between "display=..." and "linearopts = ...". (See Axis Offsets.)

Coooooo_Lee
Obsidian | Level 7

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
  • 2 replies
  • 1624 views
  • 2 likes
  • 2 in conversation