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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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