当前位置: 动力学知识库 > 问答 > 编程问答 >

Fill up white space in R Plots

问题描述:

How does one get rid of white space when plotting in R as in the example below?

I would like to do this because when I want to multiple plots on a page it looks terrible.

I'm using the par function in the following way:

par(mfrow=c(5,3),mai=rep(0,4), omi=rep(0,4))

pie3D(c(4,2,2,3,6,3),main="example")

pie3D(c(4,2,2,3,6,3),main="example")

...

pie3D(c(4,2,2,3,6,3),main="example") #do this 15 times. In my real work, it's 15 different pie charts.

Which gives:

网友答案:

The problem is that pie3D overwrites your margins to c(4,4,4,4).

You can set margins in ?pie3D:

library("plotrix")
par(mfrow=c(5,3))
for (i in 1:15) pie3D(c(4,2,2,3,6,3),main="example", mar=c(0,0,1,0))

分享给朋友:
您可能感兴趣的文章:
随机阅读: