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