【发布时间】:2019-04-29 11:12:38
【问题描述】:
我想在绘图之间添加空间,但是当我使用边距时,它要么重叠要么切割。 代码如下:
library(plotly)
plotList <- function(nplots) {
lapply(seq_len(nplots), function(x) plot_ly())
}
s1 <- subplot(plotList(6), nrows = 2, shareX = TRUE, shareY = TRUE)
s2 <- subplot(plotList(2), shareY = TRUE)
p <- subplot(s1, s2, plot_ly(), nrows = 3, margin = 0.04, heights = c(0.6, 0.3, 0.1))
print(p)
我得到这个:
而我更喜欢这样的东西(用油漆完成的图像),不同子图之间的间距更大:
我该怎么办?
【问题讨论】:
标签: r plotly spacing subplot r-plotly