Data visualization with SAS programming

Manipulate axis title in graph

Reply
Contributor
Posts: 34

Manipulate axis title in graph

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?

Trusted Advisor
Posts: 1,137

Re: Manipulate axis title in graph

Posted in reply to sas_user4
try the yaxis labelpos option as below

PROC SGPLOT DATA = new;
VBAR country / GROUP = model;
yaxis LABELPOS=CENTER ;
RUN;
Thanks,
Jag
Contributor
Posts: 34

Re: Manipulate axis title in graph

Posted in reply to Jagadishkatam
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.
SAS Super FREQ
Posts: 3,756

Re: Manipulate axis title in graph

Posted in reply to sas_user4

I think JAG meant to say

yaxis LABELPOS=TOP;

Contributor
Posts: 34

Re: Manipulate axis title in graph

Posted in reply to sas_user4

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.

Contributor
Posts: 34

Re: Manipulate axis title in graph

Posted in reply to sas_user4

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

Contributor
Posts: 34

Re: Manipulate axis title in graph

Posted in reply to sas_user4

g.jpg

Ask a Question
Discussion stats
  • 6 replies
  • 97 views
  • 1 like
  • 3 in conversation