BookmarkSubscribeRSS Feed
jltz83
Obsidian | Level 7

Can someone help me identify the option that can adjust the distance between the x-axis and the tick values. I have tried TICKVALUEVALIGN, but it doesn't have any affect since all of my values are one a single line. I'd like to be able to move the values closer to the axis.

 

3rdGradeEngProfByRace20170100934020.png

2 REPLIES 2
ballardw
Super User

@jltz83 wrote:

Can someone help me identify the option that can adjust the distance between the x-axis and the tick values. I have tried TICKVALUEVALIGN, but it doesn't have any affect since all of my values are one a single line. I'd like to be able to move the values closer to the axis.

 

 


It would help to show the code you are using so far. Since there are different ways to make similar appearing graphs some suggestions might not work with your approach.

jltz83
Obsidian | Level 7

This is the template I am using.

 

proc template;
define statgraph BarChart_PCT_by_Group / store=sasshare.templat;
dynamic 
dvTitle1Align dvTitle1Text dvTitle1Color dvFootnote1Text  dvFootnote1Color dvFootnote2Text dvFootnote2Color dvX1LabelText dvY1LabelText dvMeasure1Format dvGraphfilltype
dvGraphfillcolor dvGraphdataskin dvViewMax
;
begingraph / collation=binary;
 EntryTitle halign=dvTitle1Align dvTitle1Text / textattrs = (color = dvTitle1Color size=14pt) ; 
 Entryfootnote halign=center dvFootnote1Text / textattrs = (color=dvFootnote1Color weight=bold size=12pt);
 Entryfootnote halign=center dvFootnote2Text / textattrs = (color=dvFootnote2Color weight=bold size=10pt);

	legendItem type=marker name="byGroupMarker" / markerattrs=(symbol=trianglefilled size=9 color=ggr)
							 label="State Average" labelattrs=(color=ggr);

 	layout overlay /
		xaxisopts=( tickstyle=inside tickvaluevalign=top display=(TICKVALUES) label=dvX1LabelText griddisplay=off tickvalueattrs=(weight=normal size=10pt) ) 
		yaxisopts=( display=(LABEL) label=dvY1LabelText linearopts=(tickvalueformat=dvMeasure1Format viewmax=dvViewMax) 
						labelattrs = (family="" color=black weight=bold style=normal size=12pt) );

	    barchart X=category Y=Measure1Value 
			/ stat=mean	
			barlabel=true barlabelattrs=(family="" color=black weight=normal style=normal size=12pt ) 
				barlabelformat=dvMeasure1format filltype=dvGraphfilltype fillattrs=(color=dvGraphfillcolor) dataskin=dvGraphdataskin;

		scatterplot x=category y=Reference1Value / 	markerattrs=(symbol=trianglefilled size=9 color=ggr) datatransparency=.2;
		
		layout gridded / valign=top ;
			discretelegend "byGroupMarker" / 
			halign=left across=1 border=false backgroundcolor=whitesmoke valueattrs=(size=9) outerpad=0 ; 
		endlayout;

	endlayout;
endgraph;
end;
run; 

sas-innovate-white.png

Register Today!

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

 

Early bird rate extended! Save $200 when you sign up by March 31.

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