我想在图形之间添加间距,但是当我调整边距时,它要么重叠,要么被裁剪。 以下是代码:
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)
我得到了这个:
但我更喜欢像这样的东西(用画图绘制的图像),不同子图之间有更多的间距:
我该怎么办?