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;
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.
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.