Graphing Plot.Hist() as a Periscope Chart

Plot.Hist( ) is a very useful function for creating histograms in Python. However, this is ultimately a bar chart that can be graphed by Periscope 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})

For more information on plot.hist() itself, you can find the documentation page here:

Reply Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
Like Follow
  • 1 yr agoLast active
  • 438Views
  • 1 Following