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;

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!

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.

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