# Linear Regression in scatterplot

**URL:** <https://community.plotly.com/t/linear-regression-in-scatterplot/8669>\
**Category:** plotly.js\
**Created:** [February 28, 2018, 9:02am UTC](https://community.plotly.com/t/linear-regression-in-scatterplot/8669 "2018-02-28T09:02:41Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![anthillsocial](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/anthillsocial/32/2668_2.png) [@anthillsocial](https://community.plotly.com/u/anthillsocial)\
**Post date:** [February 28, 2018, 9:02am UTC](https://community.plotly.com/t/linear-regression-in-scatterplot/8669/1 "2018-02-28T09:02:41Z")

</div>

Hi,  
Are there any examples for creating Linear Regression lines in a scatter plot?  
Or some pointers would be nice.  
Tom

---

<div class="post-metadata">

**Author:** ![etienne](https://sea2.discourse-cdn.com/flex024/user_avatar/community.plotly.com/etienne/32/17_2.png) [@etienne](https://community.plotly.com/u/etienne)\
**Post date:** [February 28, 2018, 3:15pm UTC](https://community.plotly.com/t/linear-regression-in-scatterplot/8669/2 "2018-02-28T15:15:39Z")

</div>

duplicate of [Fitting function with plotly.js](https://community.plotly.com/t/fitting-function-with-plotly-js/1851)
