# install.packages("plotly") library(plotly) p1 <- plot_ly(mtcars, x=~mpg, y=~cyl) p2 <- plot_ly(mtcars, x=~hp, y=~cyl) s <- subplot(p1, p2, shareY = TRUE) %>% layout(yaxis = list(side = "right"))
As you can see (https://jsfiddle.net/hysa8tLw/), this plot has a y-axis on the right side of the left plot, rather than on the right side of the right plot, which would be preferred behaviour in most cases. Any ideas on how to handle this behaviour?
If I look at the layout field for this axis, I can’t see any option that might specify which plot it is aligned to:
 0 1
Relates to the following issues: