Black Lives Matter. Please consider donating to Black Girls Code today.
Dash HoloViews is now available! Check out the docs.

Multiple axis bug in subplot

If I do:
library(plotly)
ay <- list(
tickfont = list(color = “red”),
overlaying = “y”,
side = “right”,
title = “second y axis”
)
p <- plot_ly() %>%
add_lines(x = ~1:3, y = ~10*(1:3), name = “slope of 10”) %>%
add_lines(x = ~2:4, y = ~1:3, name = “slope of 1”, yaxis = “y2”) %>%
layout(
title = “Double Y Axis”, yaxis2 = ay,
xaxis = list(title=“x”)
)

It plots both axis.

but if I do:
subplot(p)
I loose the secondary axis.

How’d I make sure not to loose the secondary axis when calling the subplot function?

Follow progress here – https://github.com/ropensci/plotly/issues/954