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-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
  • 6 replies
  • 1037 views
  • 1 like
  • 3 in conversation