BookmarkSubscribeRSS Feed
sas_user4
Obsidian | Level 7

Hi all,

I have this graph created by this code:

 

PROC SGPLOT DATA = new;

VBAR country / GROUP = model;

RUN;

 

How can I change the direction of the Y-axis title from vertical to horizontal?

6 REPLIES 6
Jagadishkatam
Amethyst | Level 16
try the yaxis labelpos option as below

PROC SGPLOT DATA = new;
VBAR country / GROUP = model;
yaxis LABELPOS=CENTER ;
RUN;
Thanks,
Jag
sas_user4
Obsidian | Level 7
Thanks Jag. I tried your code but it did not make a difference. What I need is to make the alignment of the Y-axis (the word "frequency") horizontally instead of vertically.
Rick_SAS
SAS Super FREQ

I think JAG meant to say

yaxis LABELPOS=TOP;

sas_user4
Obsidian | Level 7

yaxis LABELPOS=TOP ;

 

I used the above statement, it worked but still I need to make a space between the word "frequency" and the axis, not to be exactly above the axis. Need to make space betwee the two.

sas_user4
Obsidian | Level 7

This is the graph I am looking for with a space betwee the word "frequency" and the Y-axis.

sas_user4
Obsidian | Level 7

g.jpg

SAS Innovate 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 6 replies
  • 1759 views
  • 1 like
  • 3 in conversation