【发布时间】:2023-01-21 00:40:05
【问题描述】:
在包 crosstalk 中,有一个函数 bscols() 使绘图排成一行。但是我找不到功能 bsrows() 和 rows+cols mixed ,有没有包有这样的功能?谢谢!
library(plotly)
library(tidyr)
library(crosstalk)
m <- gather(mtcars, variable, value, -vs)
msd <- highlight_key(m, ~variable)
gg <- ggplot(msd, aes(factor(vs), value)) +
geom_jitter(alpha = 0.3)
bscols(
widths = c(11, 6, 6),
filter_select("id", "Select a variable", msd, ~variable, multiple = FALSE),
ggplotly(gg, dynamicTicks = "y") %>% layout(margin = list(l = 30)),
plot_ly(msd, x = ~jitter(vs), y = ~value) %>% add_markers(alpha = 0.3)
)
【问题讨论】:
-
你有没有成功地解决这个问题?