BookmarkSubscribeRSS Feed
tianerhu
Pyrite | Level 9
PROC MEANS DATA=recovery_1 N MEAN STD VAR;      
VAR y;      
CLASS time treatment;      
OUTPUT OUT=scoremean;  
RUN;  
 
PROC GPLOT DATA=scoremean; 
GOPTIONS RESET = ALL;     
symbol1 value=circle color=black interpol = join;     
symbol2 value=triangle color=red interpol = join;     
symbol3 value=plus color=green interpol = join; 
axis1 order =(0 to 30 by 1) label=('Time (in minutes)');  
TITLE1 Time Plot of Mean Recovery score in two treatments;  
 
DATA score_mean;     
SET scoremean;     
IF _TYPE_=3;     
IF _STAT_="MEAN";  
RUN;  
  
PROC GPLOT DATA=score_mean;     
PLOT y*time=treatment / haxis = axis1;  
RUN;
3 REPLIES 3
Reeza
Super User

What does the log show? Please, ALWAYS, post your log with your code when you're having issues. The log will let you know where your errors are, if you can't decipher it, we should be able to help with that part. 

 

I would also very much recommend against learning GPLOT and instead learn SGPLOT. The procedure is newer, much better quality graphics and more intuitive code. And more options for complicated graphics. 

 


@tianerhu wrote:
PROC MEANS DATA=recovery_1 N MEAN STD VAR;      
VAR y;      
CLASS time treatment;      
OUTPUT OUT=scoremean;  
RUN;  
 
PROC GPLOT DATA=scoremean; 
GOPTIONS RESET = ALL;     
symbol1 value=circle color=black interpol = join;     
symbol2 value=triangle color=red interpol = join;     
symbol3 value=plus color=green interpol = join; 
axis1 order =(0 to 30 by 1) label=('Time (in minutes)');  
TITLE1 Time Plot of Mean Recovery score in two treatments;  
 
DATA score_mean;     
SET scoremean;     
IF _TYPE_=3;     
IF _STAT_="MEAN";  
RUN;  
  
PROC GPLOT DATA=score_mean;     
PLOT y*time=treatment / haxis = axis1;  
RUN;

 

ballardw
Super User

My first guess is that you do not have SAS/Graph licensed. The older SAS graphing procedures like GPLOT are part of SAS/Graph. If you are using SAS University Edition then the SAS/Graph procedures are not included.

Since most of the graphiing done by GPLOT and GCHART can be done with the now included in base SAS installs by SGPLOT many places are not adding the GRAPH to the license.

sas-innovate-2024.png

Available on demand!

Missed SAS Innovate Las Vegas? Watch all the action for free! View the keynotes, general sessions and 22 breakouts on demand.

 

Register now!

How to Concatenate Values

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.

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
  • 3 replies
  • 503 views
  • 0 likes
  • 3 in conversation