BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sasgiaz
Quartz | Level 8

Hi.  I need to add linear trendline to the data plot to show its trend.

What syntax could I add into this following proc gplot?

 

proc gplot data = armaxvlp;
symbol1 i = splines v = dot;
plot Bill*Waktu;
run;

 

Thankyou.

1 ACCEPTED SOLUTION

Accepted Solutions
PaigeMiller
Diamond | Level 26

Yes. (Also please look at the SGPLOT procedure, this may be simpler to use in the long run, and has a lot of nice features)

 

data class;
    set sashelp.class;
    seq=_n_;
run;

symbol1 i=rl v=dot c=green;
symbol2 i=splines v=none c=red;
proc gplot data=class;
    plot height*seq=1 height*seq=2/overlay;
run;
quit;
--
Paige Miller

View solution in original post

4 REPLIES 4
PaigeMiller
Diamond | Level 26

I am going to guess that by "linear trendline", you mean a linear regression line.

 

In that case:

 

symbol1 i = rl v = dot;
--
Paige Miller
sasgiaz
Quartz | Level 8

Could I have it both rl and splines on the data plot?

PaigeMiller
Diamond | Level 26

Yes. (Also please look at the SGPLOT procedure, this may be simpler to use in the long run, and has a lot of nice features)

 

data class;
    set sashelp.class;
    seq=_n_;
run;

symbol1 i=rl v=dot c=green;
symbol2 i=splines v=none c=red;
proc gplot data=class;
    plot height*seq=1 height*seq=2/overlay;
run;
quit;
--
Paige Miller
sasgiaz
Quartz | Level 8

Thank you so much!