DATA Step, Macro, Functions and more

PROC GPLOT order= example

Accepted Solution Solved
Reply
Occasional Contributor
Posts: 19
Accepted Solution

PROC GPLOT order= example

 

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.


Accepted Solutions
Solution
‎01-17-2017 12:15 PM
Super User
Posts: 17,730

Re: PROC GPLOT order= example

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


All Replies
Solution
‎01-17-2017 12:15 PM
Super User
Posts: 17,730

Re: PROC GPLOT order= example

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.  

 

 

Occasional Contributor
Posts: 19

Re: PROC GPLOT order= example

It was not creating charts at all. I moved the lines to after GOPTIONS and it worked perfectly.
☑ This topic is SOLVED.

Need further help from the community? Please ask a new question.

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