consider the following code in R (not in python):
library(plotly)
Animals <- c("giraffes", "orangutans", "monkeys")
SF_Zoo <- c(20, 14, 23)
LA_Zoo <- c(12, 18, 29)
SF_Zoo2 <- c(24, 18, 29)
LA_Zoo2<- c(15, 22, 33)
data <- data.frame(Animals, SF_Zoo, LA_Zoo)
data2 <- data.frame(Animals, SF_Zoo, LA_Zoo)
p1<-plot_ly(data, x = ~Animals, y = ~SF_Zoo, type = 'bar', name = 'SF Zoo') %>%
add_trace(y = ~LA_Zoo, name = 'LA Zoo') %>%
layout(yaxis = list(title = 'Count'), barmode = 'stack')
####
p2<-plot_ly(data2, x = ~Animals, y = ~SF_Zoo2, type = 'bar', name = 'SF Zoo') %>%
add_trace(y = ~LA_Zoo2, name = 'LA Zoo2') %>%
# add_trace(y = ~LA_Zoo2, name = 'SF Zoo2') %>%
layout(yaxis = list(title = 'Count'), barmode = 'stack')
subplot(p1,p2,shareX =T, which_layout = "merge")
Is there any possibility to have in subplot
"group
" as the layout?
see related #1835