Solved
New Contributor
Posts: 2

# SGPLOT Series smoothed line

I have a scatter plot using SGPLOT of multiple measurements per day over time. I have added a line graph on top which is the average for each day. It doesn't look very good. Is there any way to smooth the line? That's all!

Hope someone can help. Pretty new to SAS and this is my first time posting.

Thanks.

Kier Finnegan

Accepted Solutions
Solution
‎09-30-2015 10:18 AM
Frequent Contributor
Posts: 146

## Re: SGPLOT Series smoothed line

May be you could use LOESS statement. This statement calculate a local regression, you could specify the number of points that you want to use with the MAXPOINTS. If you use 3 points you will use the point where you are and the previous and next, so it will be smoother than a seriesplot for the mean. Also you have a option called SMOOTH when you could specify the grade of smoothnes.

All Replies
Super User
Posts: 8,634

## Re: SGPLOT Series smoothed line

As with anything graph orientated, check out Sanjey's excellent blog on graphs.  Everything you need to know about graphs is there:

http://blogs.sas.com/content/graphicallyspeaking/?s=smooth+line+plot

Solution
‎09-30-2015 10:18 AM
Frequent Contributor
Posts: 146

## Re: SGPLOT Series smoothed line

May be you could use LOESS statement. This statement calculate a local regression, you could specify the number of points that you want to use with the MAXPOINTS. If you use 3 points you will use the point where you are and the previous and next, so it will be smoother than a seriesplot for the mean. Also you have a option called SMOOTH when you could specify the grade of smoothnes.

New Contributor
Posts: 2

## Re: SGPLOT Series smoothed line

Thank you both, got it from a mixture of the two!

Super User
Posts: 8,634

## Re: SGPLOT Series smoothed line

Do mark one of them correct then, don't care which, its just clears the issue.

🔒 This topic is solved and locked.