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) – https://github.com/ropensci/plotly/issues/995