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)])

fig.show()

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â€™]

plt.figure(figsize=(20,10))

ax = plt.hist(x,100,orientation = â€˜horizontalâ€™ ,cumulative=-1,edgecolor=â€˜blackâ€™)

plt.xlabel(â€˜Frequency [%]â€™)

plt.ylabel(â€˜Power [kW]â€™)

plt.gca().xaxis.set_major_formatter(mtick.PercentFormatter(52560))

plt.axhline(y=5000, color=â€˜râ€™, linestyle=â€™-â€™)

plt.show()

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.`Preformatted text`