Folks -
Trying to rotate/change the orientation of the y-axis label, for example - I want the label="hour' to show up on plot like
H
o
u
r
I'm a fairly new SAS user, so thanks for any help I can get. I've read all the documentation I could find, but not helpful. Figure the SAS PROs can help me out.
Regards!
No, PROC SGPLOT does not support that option (which is sometimes called "Hotel Text") for the label.
The best I can offer is to suppress the label by using
yaxis display=(nolabel);
and then use SG annotation to manually stack the letters for the vertical label.
Please show the code the you are currently using to create your plot. Depending on the individual procedure the are different ways and we need to know the procedure and current options.
With SAS/Graph you can use the rotate= and angle= options.
Moved to the graphics steam.
All -
Here's the source -
PROC SGPLOT;
BY SMF70STN YEAR MONTH;
HBAR hour/RESPONSE=lpctby
DATALABELATTRS=(FAMILY='Georgia' SIZE=8pt COLOR=red weight=bold)
DATALABEL DATASKIN=crisp
BASELINEATTRS=(THICKNESS=0)
BARWIDTH=1
FILLATTRS=(COLOR=cadetblue);
format lpctby percent8.2;
TITLE;
TITLE1 H=2.0 C=BLACK 'BIT AVERAGE LPAR USAGE';
TITLE2 H=1.5 C=BLACK 'LPAR NAME = ' C=RED ' #BYVAL1';
TITLE3 H=1.5 C=BLACK 'FOR ' C=RED ' #BYVAL3' ' / ' '#BYVAL2';
xaxis offsetmin=0 label='LPAR*Logical*Percent*Busy'
labelattrs=(size=12pt family=arial color=red weight=bold);
yaxis offsetmin=.02 offsetmax=.02
label='Hour' values= (0 to 23 by 1)
labelattrs=(size=12pt family=arial color=red weight=bold)
valueshint;
run;
Regards, Mark
No, PROC SGPLOT does not support that option (which is sometimes called "Hotel Text") for the label.
The best I can offer is to suppress the label by using
yaxis display=(nolabel);
and then use SG annotation to manually stack the letters for the vertical label.
Hi Rick -
Thanks for the response, and yes, I was hoping for an easier solution.
Mark
Join us for SAS Innovate 2025, our biggest and most exciting global event of the year, in Orlando, FL, from May 6-9.
Early bird rate extended! Save $200 when you sign up by March 31.
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.
Ready to level-up your skills? Choose your own adventure.