Knowledge Base Article

Graphing Plot.Hist() As A Chart On Your Dashboard

Plot.Hist( ) is a very useful function for creating histograms in Python. However, this is ultimately a bar chart that can be graphed by Sisense for Cloud Data Teams as well, and would better match other charts on the dashboard. The data generated by Plot.Hist( ) can be broken out into the underlying data to be graphed like this:
(n2, bins2, patches) = plt.hist(datatable, 50)
bins2=bins2[:-1] #to remove the extra bin label
df = pd.DataFrame({'n2':n2, 'bins2':bins2})
periscope.output(df)
For more information on plot.hist() itself, you can find the documentation page here:
https://matplotlib.org/api/_as_gen/matplotlib.pyplot.hist.html
Updated 03-02-2023
No CommentsBe the first to comment