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.

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
  • 2 replies
  • 3080 views
  • 1 like
  • 2 in conversation