码迷,mamicode.com
首页 > 编程语言 > 详细

R语言中fig函数,图形布局的精细控制

时间:2021-04-19 15:03:04      阅读:0      评论:0      收藏:0      [点我收藏+]

标签:image   style   r语言   lin   ext   span   boxplot   函数   rgb   

 

1、

opar <- par(no.readonly = T)
par(fig=c(0,0.8,0,0.8))
plot(mtcars$wt,mtcars$mpg)
par(fig=c(0,0.8,0.60,1),new= T)
boxplot(mtcars$wt,axes = F,horizontal = T)
par(fig=c(0.65,1,0,0.8),new = T)
boxplot(mtcars$mpg,axes = F)
mtext("title", side = 3,cex = 3, line = -5,outer = T,font = 2)

技术图片

 

2、

opar <- par(no.readonly = T)
par(fig=c(0.3,1,0.3,1))
plot(1:10,ann = F)
par(fig=c(0,0.35,0.7,1),new=T)
plot(1:10,ann = F)
par(fig=c(0,0.32,0,0.8),new=T)
plot(1:10,ann = F)
par(fig=c(0.3,0.7,0,0.4),new=T)
plot(1:10,ann = F)
par(fig=c(0.7,1,0,0.4),new=T)
plot(1:10,ann = F)
mtext("test title", side = 3,cex = 3,font = 2, outer = T, line = -3)
par(opar)

技术图片

 

R语言中fig函数,图形布局的精细控制

标签:image   style   r语言   lin   ext   span   boxplot   函数   rgb   

原文地址:https://www.cnblogs.com/liujiaxin2018/p/14668443.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!