Create plotly histogram by specifying the bin edges and the value of each bar/bin

I wanted to create a histogram with plotly express or graphical object whichever works to display a plot using the output of np.histogram
Below is the output of np.hist, stored as hist and width which are the probability density and the bin edges respectively

How can I plot this as a histogram on plotly, as x and y are the actual values and not the count or density and they have to be in the range of the bins.
And so plotting it as below wouldnt make sense, Can someone pls help with this

1 Like

Hey albint!

My name is Zach, and I am having this same exact problem where I want to plot a histogram using the outputs from np.histogram(). Did you figure out how to do it?

I hope to hear from you!