distogram icon indicating copy to clipboard operation
distogram copied to clipboard

The Example Provided in Documentation Doesn't work

Open mahmouddaif opened this issue 1 year ago • 1 comments

Hello, for your reference, the example provided in the documentation for plotting a histogram doesn't work. I had to modify it as follows:

hist = distogram.histogram(h)
hist =(hist[0],  hist[1][0:len(hist[0])])
df_hist = pd.DataFrame(np.array(hist).T, columns=["count", "bin"])
print(df_hist)
fig = px.bar(df_hist, x="bin", y="count", title="distogram")
fig.update_layout(height=300)
fig.write_image("hist.png")

mahmouddaif avatar Jul 22 '22 02:07 mahmouddaif