DATA Step, Macro, Functions and more

Proc Univariate Histogram axis

Reply
Occasional Contributor
Posts: 19

Proc Univariate Histogram axis

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;
Super User
Posts: 17,818

Re: Proc Univariate Histogram axis

Since it's,percent it might be 0 to 0.7 by 0.1 

 

Also, what version of SAS are you using? 

Occasional Contributor
Posts: 19

Re: Proc Univariate Histogram axis

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.

 

 

Super User
Posts: 17,818

Re: Proc Univariate Histogram axis

What does the log say when you use the whole numbers? 

Also, make sure your looking at updated output. 

 

 

Occasional Contributor
Posts: 19

Re: Proc Univariate Histogram axis

The log just displays a note showing the procedure ran, and then the process time.  No other messages

Super User
Posts: 17,818

Re: Proc Univariate Histogram axis

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;
Occasional Contributor
Posts: 19

Re: Proc Univariate Histogram axis

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

Super User
Posts: 17,818

Re: Proc Univariate Histogram axis

Did the first graph work?

I'm starting to suspect you're not seeing the updated graph for some reason.

Occasional Contributor
Posts: 19

Re: Proc Univariate Histogram axis

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.

Super User
Posts: 17,818

Re: Proc Univariate Histogram axis

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

Super User
Posts: 17,818

Re: Proc Univariate Histogram axis

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

Ask a Question
Discussion stats
  • 10 replies
  • 420 views
  • 0 likes
  • 2 in conversation