如何在rmarkdown中更改2 x 2位数的高度

vc6uscn9  于 2023-03-05  发布在  其他
关注(0)|答案(1)|浏览(104)

我想把每一个图形做得更长一些,高度在2乘2以下。你有什么想法吗?

attach(mtcars)
par(mfrow=c(2,2))
plot(wt,mpg, main="Scatterplot of wt vs. mpg")
plot(wt,disp, main="Scatterplot of wt vs disp")
hist(wt, main="Histogram of wt")
boxplot(wt, main="Boxplot of wt")

e5nqia27

e5nqia271#

您可以在代码块中设置fig.height

```{r, fig.height = 10}
attach(mtcars)
par(mfrow=c(2,2))
plot(wt,mpg, main="Scatterplot of wt vs. mpg")
plot(wt,disp, main="Scatterplot of wt vs disp")
hist(wt, main="Histogram of wt")
boxplot(wt, main="Boxplot of wt")

![](https://i.stack.imgur.com/lE2Cd.png)

相关问题