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 2025: Register Now

Registration is now open for SAS Innovate 2025 , our biggest and most exciting global event of the year! Join us in Orlando, FL, May 6-9.
Sign up by Dec. 31 to get the 2024 rate of just $495.
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.

SAS Training: Just a Click Away

 Ready to level-up your skills? Choose your own adventure.

Browse our catalog!

Discussion stats
  • 3 replies
  • 649 views
  • 0 likes
  • 3 in conversation