How do I change the scale of a plot in R markdown? In other words, how do I make the output look more like to the plot on the bottom when I knit my HTML document?
---
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.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.