使用grid.arrange更改多时隙ggplot2中的标题 [英] changing title in multiplot ggplot2 using grid.arrange

查看:225
本文介绍了使用grid.arrange更改多时隙ggplot2中的标题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用grid.arrange创建了一个2x2图:

  library(gridExtra)
grid。安排(p1,p3,p2,p4,ncol = 2,nrow = 2,top =每日QC:蓝色)

这个多时隙的主标题非常小。有没有办法改变标题的文字大小和字体。 (Daily QC:Blue,gp = gpar(fontsize = 20,font = 3))

与v> = 2.0.0的gridExtra, main 已成为 top (for与底部左和)的一致性。 p>

I have managed to make a 2x2 plot using grid.arrange:

library(gridExtra)
grid.arrange(p1,p3,p2,p4, ncol=2, nrow=2, top = "Daily QC: Blue")

The main title of this multiplot is very small. Is there a way to change the title text size and font.

解决方案

main=textGrob("Daily QC: Blue",gp=gpar(fontsize=20,font=3))

Edit with v>=2.0.0 of gridExtra, main has become top (for consistency with bottom, left and right).

这篇关于使用grid.arrange更改多时隙ggplot2中的标题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆