SAS Procedures

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

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;

 

Thank you in advance. 

1 ACCEPTED SOLUTION

Accepted Solutions
PeterClemmensen
Tourmaline | Level 20

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;

 

View solution in original post

6 REPLIES 6
PaigeMiller
Diamond | Level 26

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
PeterClemmensen
Tourmaline | Level 20

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;

 

Amanda_Lemon
Quartz | Level 8

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

PaigeMiller
Diamond | Level 26

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

--
Paige Miller
PeterClemmensen
Tourmaline | Level 20

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;

 

Amanda_Lemon
Quartz | Level 8

Got it -- thank you!

sas-innovate-wordmark-2025-midnight.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. Sign up by March 14 for just $795.


Register now!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 6 replies
  • 3041 views
  • 0 likes
  • 3 in conversation