title: Plot best fit line with plotly
body: <p>I am using plotly's python library to plot a scatter graph of time series data. Eg data :</p>
  
  <pre><code>2015-11-11    1
  2015-11-12    2
  2015-11-14    4
  2015-11-15    2
  2015-11-21    3
  2015-11-22    2
  2015-11-23    3
  </code></pre>
  
  <p>Code in python:</p>
  
  <pre><code>df = pandas.read_csv('~/Data.csv', parse_dates=["date"], header=0)
  df = df.sort_values(by=['date'], ascending=[True])
  trace = go.Scatter(
              x=df['date'],
              y=df['score'],
              mode='markers'
  )
  fig.append_trace(trace, 2, 2)  # It is a subplot
  iplot(fig)
  </code></pre>
  
  <p>Once the scatter plot is plotted, I want to plot a best fit line over this. </p>
  
  <p>Does plotly provide this programmatically? It does from the <a href="https://plot.ly/how-to-create-a-line-of-best-fits/" rel="nofollow noreferrer">webapp</a>, but I did not find any documentation about how to do it programmatically.
  The line in the link is exactly what I want:</p>
  
  <p><a href="https://i.stack.imgur.com/4Fp1F.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/4Fp1F.png" alt="enter image description here"></a></p>