I’m a very new user of plotly. I’m using the Python API (in offline mode) within an IPython notebook.
I have constructed a bubble plot (basically the same thing as a scatter plot with variable sized markers) which has turned out fine.
I would like to fit a linear regression line through the data and draw it on the existing figure.
I have seen examples of fitting being performed through the Plot.ly web interface, but haven’t found one using the Python API.
Are there any convenience functions that would allow me to do so in Python, or will I have to manually do it (i.e. using statsmodel (say) to find the equation of fit, followed by generating points satisfying the equation, and finally then drawing a line through the points on the figure)?
Note that I require a “proper” regression fit - I’m not looking for a ‘lines+markers’ mode sort of a thing.