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

 

I am trying to control the number distribution on the X-axis and Y-axis using a proc gplot procedure with an order = option.  The scattter plot works fine by itself, but I am not sure where to put the axis1 order=(50 to100 by 10); and axis2 order=(50 to 100 by 10); statements to have the both axis go from 50 to 100 by 10's. Does it go above the goptions line, or after it? Neither one worked

 

axis1 order=(50 to 100 by 10);

axis2 order=(50 to 100 by 10);

goptions reset=all cback=white border htitle=12pt htext=10pt;

symbol1 height=3 color=brown value=star;

symbol2 height=3 color=red value=plus;

symbol3 height=3 color=blue value=dot;

symbol4 height=3 color=green value=@;

symbol5 height=3 color=purple value=%;

symbol6 height=3 color=black value=circle;

title1 "Scatter Plot of PromiseRate and KeptRate";

proc gplot data=oneplace;

by agency;

plot promiserate*keptrate=tenure / haxis=axis1 vaxis=axis2 legend=legend1;

RUN;

QUIT;

 

 

WARNING: Legend statement 1 could not be found. The default legend description will be used.

WARNING: AXIS statement 2 not found. The default axis description will be used.

WARNING: AXIS statement 1 not found. The default axis description will be used.

NOTE: 1 observation(s) contained a MISSING value for the PromiseRate * KeptRate = tenure request.

NOTE: The above message was for the following BY group:

 

Using SAS 9.4 enterprise guide 6.1 64 bit.

1 ACCEPTED SOLUTION

Accepted Solutions
Reeza
Super User

Axis statements go after GOPTIONS, but before the proc. Define what 'not working' means please. Are you receiving an error?

 

FYI  - if you're just starting out and learning SAS Graph procedures I would highly recommend learning SGPLOT instead of GPLOT. 

You get better quality graphics, more control, options and the code is more intuitive.  

 

 

View solution in original post

2 REPLIES 2
Reeza
Super User

Axis statements go after GOPTIONS, but before the proc. Define what 'not working' means please. Are you receiving an error?

 

FYI  - if you're just starting out and learning SAS Graph procedures I would highly recommend learning SGPLOT instead of GPLOT. 

You get better quality graphics, more control, options and the code is more intuitive.  

 

 

pangea17
Quartz | Level 8
It was not creating charts at all. I moved the lines to after GOPTIONS and it worked perfectly.

hackathon24-white-horiz.png

The 2025 SAS Hackathon has begun!

It's finally time to hack! Remember to visit the SAS Hacker's Hub regularly for news and updates.

Latest Updates

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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 2 replies
  • 3949 views
  • 1 like
  • 2 in conversation