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
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;
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;
is it possible to have dots at each points on the plot ?
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;
The documentation for SGPLOT is pretty thorough and there are a lot of examples as well:
By "dots" I assume you mean "show markers at the data values." use the MARKERS option:
series y=prop x=val / markers;
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!
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.
Ready to level-up your skills? Choose your own adventure.