Is there a standard, effective way of producing a QQ-Plot using Plotly?
I would be interested in testing the normal/log-normal fit of my data.
Alright, here is how I think the state of affairs is now [2020 edit]:
Say we have 500 random draws from a distribution which we think might be the lognormal distribution:
X_lognorm = np.random.lognormal(mean=0.0, sigma=1.7, size=500)
Plotting
Imports
import numpy as np
from scipy import stats
import plotly.graph_objects as go
Run plotly
qq = stats.probplot(X_lognorm, dist='lognorm', sparams=(1))
x = np.array([qq[0][0][0], qq[0][0][-1]])
fig = go.Figure()
fig.add_scatter(x=qq[0][0], y=qq[0][1], mode='markers')
fig.add_scatter(x=x, y=qq[1][1] + qq[1][0]*x, mode='lines')
fig.layout.update(showlegend=False)
fig.show()
plotly dash script but I had to make the figure as a go.Figure object. That is, instead of fig = dict(data=data, layout=layout) I had fig = go.Figure(data, layout=layout) .