You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I really like the plotly.express.ecdf and have been using it a lot in my daily work.
When I show ecdf plots in meetings, I usually show it with marginal='histogram', since this is easier understandable for the non-data-scientists in the room.
However, since the amount of data varies I would like to have a normalized histogram, i.e. have percent values.
I know this would be possible with subplots, but there are really a lot of ugly adjustments to make.
So a solution could be to show the percentage in the hint as well, or something like histnorm from plotly.express.histogram.
Example for easy testing:
import plotly.express as px
import numpy as np
import pandas as pd
# Generate random data
np.random.seed(42) # For reproducibility
data = np.random.normal(loc=0, scale=1, size=1000) # Normal distribution data
# Create a pandas dataframe
df = pd.DataFrame({'Values': data})
# Create ECDF plot with histogram
fig = px.ecdf(data,
ecdfnorm='percent',
marginal='histogram')
# Show the figure
fig.show()
The text was updated successfully, but these errors were encountered:
I really like the plotly.express.ecdf and have been using it a lot in my daily work.
When I show ecdf plots in meetings, I usually show it with
marginal='histogram'
, since this is easier understandable for the non-data-scientists in the room.However, since the amount of data varies I would like to have a normalized histogram, i.e. have percent values.
I know this would be possible with subplots, but there are really a lot of ugly adjustments to make.
So a solution could be to show the percentage in the hint as well, or something like
histnorm
from plotly.express.histogram.Example for easy testing:
The text was updated successfully, but these errors were encountered: