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

Hello

 

I'm trying to use PROC SGPLOT  with SAS UE :

proc sgplot data=ebouli;
symbol1 i=join v=dot;
plot prop*val=1 / haxis= 0 to 17 by 1 hminor=0 
	          vaxis= 0 to 1 by 0.2 vminor=1;
run;
quit;
goptions reset=all;

but get this error :

 proc sgplot data=ebouli;
 76         symbol1 i=join v=dot;
 76         symbol1 i=join v=dot;
            _______
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 
 77         plot prop*val=1 / haxis= 0 to 17 by 1 hminor=0
            ____
            180
 ERROR 180-322: Statement is not valid or it is used out of proper order.
 78           vaxis= 0 to 1 by 0.2 vminor=1;
 79         run;

Please help

1 ACCEPTED SOLUTION

Accepted Solutions
Rick_SAS
SAS Super FREQ

You are trying to use the syntax for PROC GPLOT (which is not available in SAS UE), but you are using PROC SGPLOT. The syntax for PROC SGPLOT is a little different, but very easy. Try this, which creates the plot you want:

 


proc sgplot data=ebouli;
series y=prop x=val;
xaxis values=(0 to 17);
yaxis values=(0 to 1 by 0.2) minor;
run;

View solution in original post

6 REPLIES 6
Rick_SAS
SAS Super FREQ

You are trying to use the syntax for PROC GPLOT (which is not available in SAS UE), but you are using PROC SGPLOT. The syntax for PROC SGPLOT is a little different, but very easy. Try this, which creates the plot you want:

 


proc sgplot data=ebouli;
series y=prop x=val;
xaxis values=(0 to 17);
yaxis values=(0 to 1 by 0.2) minor;
run;
totoilestbeau
Calcite | Level 5

is it possible to have dots at each points on the plot ?

satyamdubey1611
Calcite | Level 5

Hi ,

 

I am unable to use sas macro date in proc sgplot X axis value.

 

Below is my code.

 


%let Max_date= Max(of Order_Date);
%let Min_date= Min(of Order_Date);

proc sgplot data=orion.order_fact;

series x=Order_Date y=Total_Retail_Price/ group=Quantity
break nomissinggroup
markerattrs=(size=10px)
lineattrs=(thickness=3px);

xaxis label='DATE' values=(&Min_date. to &Max_date. by day);

yaxis grid label='Percent change';

run;

Reeza
Super User
Please post your question as a new thread, not a thread with a different question. In this case, only previous respondents will see the post rather than everyone.
Reeza
Super User

The documentation for SGPLOT is pretty thorough and there are a lot of examples as well:

 

http://documentation.sas.com/?docsetId=grstatproc&docsetTarget=p00mgdlxbij4v3n0zewfb9cpfxu1.htm&docs...

 

 

Rick_SAS
SAS Super FREQ

By "dots" I assume you mean "show markers at the data values."  use the MARKERS option:

 

series y=prop x=val / markers;

hackathon24-white-horiz.png

2025 SAS Hackathon: There is still time!

Good news: We've extended SAS Hackathon registration until Sept. 12, so you still have time to be part of our biggest event yet – our five-year anniversary!

Register Now

SAS Enterprise Guide vs. SAS Studio

What’s the difference between SAS Enterprise Guide and SAS Studio? How are they similar? Just ask SAS’ Danny Modlin.

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