Hi,
I am trying to learn the SGPLOT STYLEATTRS Statement. On trying below code (exactly copied from the URL add for reference), I am getting "ERROR 180-322: Statement is not valid or it is used out of proper order.". I checked my syntax as well but can't figure out what is an actual issue here. Can somebody help?
/* Sort the data set by the group variable */ proc sort data=sashelp.class out=class; by age; run;
/* Generate the graph using the sorted data */ proc sgplot data=class; styleattrs datacontrastcolors=(red green blue) datalinepatterns=(dot solid); series x=height y=weight / group=age; keylegend; run;
Show your log. I'll guess that either your version of SAS does not support STYLEATTRS or there is some other problem causing the 180 error.
I am doing this coding in SAS EG 7.15 (7.100.5.5850) (32-bit) SAS version is 9.3.
Note that SAS 9.4 was first released 6 years ago and has had 6 maintenance releases since then.
Your link above is for SAS 9.4 but you've indicated you're using SAS 9.3
Checking the SAS 9.3 documentation, STYLEATTRS is not listed in the syntax.
If your purpose is learning, try SAS Academics on Demand (Independent Learner path) or SAS University Edition.
If your purpose is implementing style controls, you'll need either template modifications or GTL depending on what you're trying to do.
@kunjgemi wrote:
Hi,
I am trying to learn the SGPLOT STYLEATTRS Statement. On trying below code (exactly copied from the URL add for reference), I am getting "ERROR 180-322: Statement is not valid or it is used out of proper order.". I checked my syntax as well but can't figure out what is an actual issue here. Can somebody help?
/* Sort the data set by the group variable */ proc sort data=sashelp.class out=class; by age; run;/* Generate the graph using the sorted data */ proc sgplot data=class; styleattrs datacontrastcolors=(red green blue) datalinepatterns=(dot solid); series x=height y=weight / group=age; keylegend; run;
Hi,
Currently, my company has SAS 9.3, so how shall I add differently line patterns and symbol to below plot with SAS 9.3?
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!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.
Select SAS Training centers are offering in-person courses. View upcoming courses for: