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

Hello. Do you know how these syntax came out error?

 

PROC SGPLOT DATA=WORK.Sheet1;
Symbol1 i=splines v=dot;
PLOT Radio*period;
RUN;

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 PROC SGPLOT DATA=WORK.Sheet1;
74 Symbol1 i=splines v=dot;
74 Symbol1 i=splines v=dot;
_______
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
75 PLOT Radio*period;
____
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
76 RUN;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
 
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
91
 
Your help much appreciated, Thankyou
1 ACCEPTED SOLUTION

Accepted Solutions
ballardw
Super User

@sasgiaz wrote:

Hello. Do you know how these syntax came out error?

 

PROC SGPLOT DATA=WORK.Sheet1;
Symbol1 i=splines v=dot;
PLOT Radio*period;
RUN;

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 PROC SGPLOT DATA=WORK.Sheet1;
74 Symbol1 i=splines v=dot;
74 Symbol1 i=splines v=dot;
_______
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
75 PLOT Radio*period;
____
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
76 RUN;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
 
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
91
 
Your help much appreciated, Thankyou

SYMBOL statements are primarily used by Proc Gplot and G3d and are not valid for Proc SGplot.

PLOT statement also is not used by Proc Sgplot as the first statement would be the type of plot scatter, series, vbox.

 

It looks like you would request a SPLINE plot and a scatter plot to over lay the dot markers.

Try

Proc sgplot data=work.sheet1;
    spline x=period y=radio;
    scatter x=period y=radio/ markerattrs=(symbol=circlefilled);
run;

Or try Proc Gplot.

 

View solution in original post

3 REPLIES 3
andreas_lds
Jade | Level 19

Afaik proc sgplot does not have symbol or plot-statement.

 

You can find the documentation here.

ballardw
Super User

@sasgiaz wrote:

Hello. Do you know how these syntax came out error?

 

PROC SGPLOT DATA=WORK.Sheet1;
Symbol1 i=splines v=dot;
PLOT Radio*period;
RUN;

 

1 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
72
73 PROC SGPLOT DATA=WORK.Sheet1;
74 Symbol1 i=splines v=dot;
74 Symbol1 i=splines v=dot;
_______
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
 
75 PLOT Radio*period;
____
180
ERROR 180-322: Statement is not valid or it is used out of proper order.
76 RUN;
 
NOTE: The SAS System stopped processing this step because of errors.
NOTE: PROCEDURE SGPLOT used (Total process time):
real time 0.01 seconds
cpu time 0.01 seconds
 
77
78 OPTIONS NONOTES NOSTIMER NOSOURCE NOSYNTAXCHECK;
91
 
Your help much appreciated, Thankyou

SYMBOL statements are primarily used by Proc Gplot and G3d and are not valid for Proc SGplot.

PLOT statement also is not used by Proc Sgplot as the first statement would be the type of plot scatter, series, vbox.

 

It looks like you would request a SPLINE plot and a scatter plot to over lay the dot markers.

Try

Proc sgplot data=work.sheet1;
    spline x=period y=radio;
    scatter x=period y=radio/ markerattrs=(symbol=circlefilled);
run;

Or try Proc Gplot.

 

Reeza
Super User

Looks like you're taking GPLOT code and just switching it to SGPLOT and expecting it to run. 

Unfortunately that doesn't work. 

 

You need the correct SG code to make this work. 

 

If you're finding code that references SAS/GRAPH I wouldn't use it, that's fairly outdated method to create graphics and the quality is not nearly as good, and it's harder to code in. 

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!

What is Bayesian Analysis?

Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.

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
  • 3 replies
  • 1318 views
  • 2 likes
  • 4 in conversation