BookmarkSubscribeRSS Feed
dsriggs
Fluorite | Level 6

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;
10 REPLIES 10
Reeza
Super User

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

 

Also, what version of SAS are you using? 

dsriggs
Fluorite | Level 6

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.

 

 

Reeza
Super User

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

Also, make sure your looking at updated output. 

 

 

dsriggs
Fluorite | Level 6

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

Reeza
Super User

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;
dsriggs
Fluorite | Level 6

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

Reeza
Super User

Did the first graph work?

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

dsriggs
Fluorite | Level 6

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.

Reeza
Super User

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

Reeza
Super User

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

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

How to Concatenate Values

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.

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
  • 10 replies
  • 12320 views
  • 0 likes
  • 2 in conversation