首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >GGiraph中的绘图列表

GGiraph中的绘图列表
EN

Stack Overflow用户
提问于 2020-07-03 15:43:10
回答 1查看 107关注 0票数 2

我正在尝试使用Rstudio中的GGiraph绘制一个绘图列表。绘制多个绘图的解决方案是通过Cowplot (ggobj = plot_grid(plot1, plot2))或Patchwork (code = print(plot / plot))。如果您单独打印单个打印,则此方法有效。但是,它看起来不接受绘图列表。我希望这些图排列在一列多行中。

有谁有解决这个问题的办法吗?

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2020-07-06 19:04:22

您可以尝试在plot_grid中使用plotlist参数。

代码语言:javascript
复制
#Using the example from giraffe
library(ggiraph)
library(ggplot2)

dataset <- mtcars
dataset$carname = row.names(mtcars)

gg_point = ggplot( data = dataset,
    mapping = aes(x = wt, y = qsec, color = disp,
    tooltip = carname, data_id = carname) ) +
  geom_point_interactive() + theme_minimal()

#using the plotlist argument
library(cowplot)
girafe(ggobj = plot_grid(plotlist=list(gg_point, gg_point), ncol=1))
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/62710749

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档