✊🏿 Black Lives Matter. Please consider donating to Black Girls Code today.
⚡️ Concerned about the grid? Kyle Baranko teaches how to predicting peak loads using XGBoost. Register for the August webinar!

Compute empirical cumulative distribution in R in plolty

I want to plot in plotly a empirical cumulative distribution in R. Can anyone help with a example?

I have a example, but with ggplot using geom_step:
g <- ggplot(df, aes(x=df$vector)) + geom_step(aes(x = vector, y = 1 - …y…, color =“steelblue4”), size=1 , stat=‘ecdf’, pad=FALSE) +labs(x=“Age”, "y = “Surv”)

Rplot003

I want a way to get empirical cumulative distribution in R with plotly.
Thanks :wink: