I'm trying to format the y-axis on a histogram and no matter what I try the y-axis doesn't change from the default. SAS isn't giving any errors so I don't know what the problem is. Here is an example of what I am trying:
proc univariate data=data;
var variable;
histogram variable/ vscale=percent vaxis=0 to 70 by 10;
run;
Since it's,percent it might be 0 to 0.7 by 0.1
Also, what version of SAS are you using?
I tried 0 to 0.7 by 0.1 also and that doesn't work either. I get a warning that says:
"WARNING: The VAXIS= list must cover the range from 0 to 67.356797792 in order to be used" Also I'm using SAS 9.3.
What does the log say when you use the whole numbers?
Also, make sure your looking at updated output.
The log just displays a note showing the procedure ran, and then the process time. No other messages
Works fine for me.
Try this one and see the graph.
proc univariate data=sashelp.class;
var age;
histogram age/ vscale=percent vaxis=0 to 50 by 10;
run;
Even with this example I can't change the range. If I put in:
vaxis=0 to 60 by 10;
Then it still does 0 to 50
Did the first graph work?
I'm starting to suspect you're not seeing the updated graph for some reason.
Yes the first graph was correct, but even if I open up a new SAS session and try:
proc univariate data=sashelp.class;
var age;
histogram age/ vscale=percent vaxis=0 to 70 by 10;
run;
It will still stop at 50. It's like it always gives me the default. I tried with some other datasets in the SASHELP library, and it always seems like it gives me the default regardless of what I specify.
Then you should submit a ticket to tech support with your SAS version, code and output. I can't replicate your issue, but I'm SAS 9.4M3
Then you should submit a ticket to tech support with your SAS version, code and output. I can't replicate your issue, but I'm SAS 9.4M3
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.
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.