在R中撤消布局 [英] Undo layout in R
本文介绍了在R中撤消布局的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我最初创建一个由boxplot&直方图.为此,我设置了
nf <- layout(mat = matrix(c(1,2),2,1, byrow=TRUE), height = c(1,3))
par(mar=c(2,2,1,1))
# Draw box plot
# Draw histogram
此后,我需要创建一个常规图.但是我发现所有后续图都尝试遵循相同的布局.一个在上面,另一个在下面.
如何将布局重置为默认设置?
我应该使用 nf<-layout(mat = matrix(c(1,1),1,1,byrow = FALSE))
谢谢 加内什
解决方案
是,请使用:
par(mfrow=c(1,1))
可以在此处找到其他好的答案 >
I initially create a plot which is a combination of boxplot & histogram. For this I set
nf <- layout(mat = matrix(c(1,2),2,1, byrow=TRUE), height = c(1,3))
par(mar=c(2,2,1,1))
# Draw box plot
# Draw histogram
After this I need to create a regular plot. But I find that all subsequent plots try to follow the same layout. One on top and another one below.
How can I reset the layout to default?
Should I use nf <- layout(mat = matrix(c(1,1),1,1, byrow=FALSE))
Thanks Ganesh
解决方案
Yes, use:
par(mfrow=c(1,1))
Other good answers can be found here
这篇关于在R中撤消布局的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文