Black Lives Matter. Please consider donating to Black Girls Code today.
Learn how to use COVID-19 data in open source Dash apps. Register for the Sept 23rd webinar with IQT!

Point Ordering in Ribbon Graph

Hi, I have a cumulative ribbon graph working correctly in ggplot, but when I use ggplotly the point ordering changes to descending for points with the same x coordinate. The graph should be constantly increasing, but you can see it looks jagged in ggplotly. Please let me know if you can think of any solutions.




#sample code
x <- c(seq(1:10),2:3)
y <- c(1:12)
df <- data.frame(x,y)
df <- arrange(df,x)
df$cumulative <- cumsum(df$y)

p <- ggplot(df,aes(x,ymin=0,ymax=cumulative))+geom_ribbon()
p #graph in ggplot
ggplotly§ #graph in ggplotly

Oh, interesting, thanks, I’ll created a new issue on GitHub (please report bugs there) –