Graphics Programming

Data visualization using SAS programming, including ODS Graphics and SAS/GRAPH. Charts, plots, maps, and more!
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-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 2182 views
  • 1 like
  • 3 in conversation