Hi! I am trying to plot a cumulative histogram in Plotly. This is the code I used for my plot:
fig = go.Figure(data=[go.Histogram(y=df_turbine_name[‘0’],cumulative_enabled=True)])
The data used is a column from a dataframe.
This is the graph I get:
However, I would like to reverse the shape of the histogram. I plotted what I would like to get in Matplotlib:
(Ignore the red line)
This is the Matplotlib code:
x = df_turbine_name[‘0’]
ax = plt.hist(x,100,orientation = ‘horizontal’ ,cumulative=-1,edgecolor=‘black’)
plt.axhline(y=5000, color=‘r’, linestyle=’-’)
Basically, Plotly is doing the cumulative sum the other way round and I was wondering if there is a Plotly equivalent to the ‘cumulative = -1’ from Matplotlib. In case you were wondering if you set ‘cumulative = True’ in Matplotlib you get the same shape of graph I got in Plotly. The -1 value makes the opposite sum of cumulative values.
Any chance someone knows how can I get the histogram I plotted in Matplotlib in Plotly?
Thanks in advance.