Quartz | Level 8

## Increasing font size in a histogram

Hello,

I am trying to increase the font size of both labels and tick values for both x-axis and y-axis. Is there an easy way to do that?

``````proc univariate data = data noprint;
class Group;
histogram Test / nrows = 3 normal;
run;``````

1 ACCEPTED SOLUTION

Accepted Solutions
Tourmaline | Level 20

## Re: Increasing font size in a histogram

Use PROC SGPANEL and do something like this

``````proc sgpanel data=sashelp.iris;
panelby species / rows=3;
histogram SepalLength;
rowaxis labelattrs=(size=12 weight=bold) valueattrs=(size=12 weight=bold);
colaxis labelattrs=(size=12 weight=bold) valueattrs=(size=12 weight=bold);
run;``````

6 REPLIES 6
Diamond | Level 26

## Re: Increasing font size in a histogram

If the histogram has to be in PROC UNIVARIATE, then I think the only solution (which would be difficult) is to modify the template.

If you can do this in PROC SGPLOT, then the solution is simple.

--
Paige Miller
Tourmaline | Level 20

## Re: Increasing font size in a histogram

These things are easier to control in PROC SGPLOT doing something like this

``````title "Some Histogram";
proc sgplot data=sashelp.iris;
histogram SepalLength;
xaxis labelattrs=(size=12 weight=bold) valueattrs=(size=12 weight=bold);
yaxis labelattrs=(size=12 weight=bold) valueattrs=(size=12 weight=bold);
run;
title;``````

Quartz | Level 8

## Re: Increasing font size in a histogram

I thought about sgplot but can it make 3 histograms placed nicely one under another? Like proc univariate does.

Diamond | Level 26

## Re: Increasing font size in a histogram

Good point. To get histograms vertically above of one another, use PROC SGPANEL.

--
Paige Miller
Tourmaline | Level 20

## Re: Increasing font size in a histogram

Use PROC SGPANEL and do something like this

``````proc sgpanel data=sashelp.iris;
panelby species / rows=3;
histogram SepalLength;
rowaxis labelattrs=(size=12 weight=bold) valueattrs=(size=12 weight=bold);
colaxis labelattrs=(size=12 weight=bold) valueattrs=(size=12 weight=bold);
run;``````

Quartz | Level 8

## Re: Increasing font size in a histogram

Got it -- thank you!

Discussion stats
• 6 replies
• 2728 views
• 0 likes
• 3 in conversation