BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
Roxxanne
Fluorite | Level 6

Hi all,

I am struggling with customizing the horizontal axis label for some graphs I have to produce. I have seen some mix answers on how to use this statement. I have seen that 'haxis' can be used to describe the range of the axis as well as the label. I have tried to use this function in a similar manner as other title statements however, I receive an error. I have also tried haxislabel='name' however, this also does not work. Please help!

This is my code:
proc univariate data=WORK.THESIS;
var TP;
by Scenario;
cdfplot / haxislabel="Trade off point (number of years)"
vscale=PROPORTION vaxislabel="Cumulative response proportion"
haxis= 4 to 11 by 1;
run;

When I use this statement I receive an error, saying it is expecting  a numeric constant or datetime constant.


Thanks for your help!

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User
You have limited options to control your graphics coming out of ODS GRAPHICS. HAXIS just takes the name of the axis statement, not specifications. I would highly recommend just piping the data to an SGPLOT procedure where you can control this in more detail.

Or try adding the AXIS statement explicitly.

axis1 value = 4 to 11 by 1;

Then assign axis1 to haxis.

View solution in original post

1 REPLY 1
Reeza
Super User
You have limited options to control your graphics coming out of ODS GRAPHICS. HAXIS just takes the name of the axis statement, not specifications. I would highly recommend just piping the data to an SGPLOT procedure where you can control this in more detail.

Or try adding the AXIS statement explicitly.

axis1 value = 4 to 11 by 1;

Then assign axis1 to haxis.

Ready to join fellow brilliant minds for the SAS Hackathon?

Build your skills. Make connections. Enjoy creative freedom. Maybe change the world. Registration is now open through August 30th. Visit the SAS Hackathon homepage.

Register today!
Mastering the WHERE Clause in PROC SQL

SAS' Charu Shankar shares her PROC SQL expertise by showing you how to master the WHERE clause using real winter weather data.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 1 reply
  • 546 views
  • 2 likes
  • 2 in conversation