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

Hi,

 

How can I control x-axis size in proc template (=valueattrs in proc sgplot)? Currently everything is size 10 aside from the xaxis, which is size 7. Thanks!

 

proc template;
define statgraph one;
begingraph;
layout lattice / columns=1 rowdatarange=union columngutter=10px;
rowaxes;
rowaxis / display=(tickvalues) tickvalueattrs=(size=10);
endrowaxes;
layout overlay / walldisplay=none xaxisopts=(tickvalueattrs=(size=10) labelattrs=(size=10))
xaxisopts=(linearopts=(viewmin=0 viewmax=10)
griddisplay=on display=(line ticks tickvalues));
innermargin / align=left;
axistable y=ObsId=value / showmissing=false valuehalign=center
headerlabel='Event/Value' HEADERLABELATTRS=(size=10)
valueattrs=(size=10) labelattrs=(size=10) pad=(right=5pct);
endinnermargin;
boxplot y=marker x=Obs / orient=horizontal display=(caps fill mean median) name='a';
discretelegend "a" / DISPLAYCLIPPED=true title="marker" location=outside valign=top
halign=center border=false across=1 valueattrs=(color=white size=10) titleattrs=(size=10);
endlayout;
endlayout;
endgraph;
end;
run;

proc sgrender data=combined template=one;
run;

1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

Look closely at this bit of your code:

layout overlay / walldisplay=none xaxisopts=(tickvalueattrs=(size=10) labelattrs=(size=10))
xaxisopts=(linearopts=(viewmin=0 viewmax=10)

You have TWO xaxisopts. SAS will use the "latest" or last option set when you provide multiples.

Make all of the options fit into one xaxisopts and I suspect you will have your solution.

View solution in original post

4 REPLIES 4
ballardw
Super User

Size of what?

greveam
Quartz | Level 8

The numbers below the x-axis - from the boxplot.

greveam
Quartz | Level 8
Usually it would the numbers on the y-axis (response variable in boxplot) but I used the orient=horizontal to get the response variable mapped to the x-axis.
ballardw
Super User

Look closely at this bit of your code:

layout overlay / walldisplay=none xaxisopts=(tickvalueattrs=(size=10) labelattrs=(size=10))
xaxisopts=(linearopts=(viewmin=0 viewmax=10)

You have TWO xaxisopts. SAS will use the "latest" or last option set when you provide multiples.

Make all of the options fit into one xaxisopts and I suspect you will have your solution.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

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.

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