[英]Adjust plot scale in R markdown
How do I change the scale of a plot in R markdown?如何在 R markdown 中更改 plot 的比例? In other words, how do I make the output look more like to the plot on the bottom when I knit my HTML document?
换句话说,当我编织 HTML 文档时,如何使 output 看起来更像底部的 plot?
---
title: "Test"
output: html_document
---
```{r}
data <- data.frame(x = 1:10, y = rnorm(10))
ggplot(data, aes(x, y)) +
geom_point(size = 4)
For each code chunk in the curly braces at top you can set fig.height
and fig.width
which sets the output dimensions when knitting.对于顶部花括号中的每个代码块,您可以设置
fig.height
和fig.width
,它们在编织时设置 output 尺寸。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.