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-2024.png

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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.

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