Here is my problematic slide:
The plain text for this slide is
# Title
```{r plot, echo=FALSE}
library("ggplot2")
x <- seq(-1,1,0.05)
y <- x^3/3-x^2 + rnorm(41,sd=0.1)
qplot(x,y)+geom_smooth()
```
- item 1
- item 2
And I want to:
Could you please give me some hints? Thank you.
You should take time to read the wonderful documentation provided for knitr
.
Without knowing your work flow to create the slides it is hard answer from the html5 end.
You are looking for fig.width
, fig.height
, fig.cap
, warning
and message
from the knitr
chunk options.
```{r plot, echo=FALSE,fig.width = 3, fig.height = 3, fig.cap = '', warning = FALSE, message = FALSE, cache = FALSE}
library("ggplot2")
x <- seq(-1,1,0.05)
y <- x^3/3-x^2 + rnorm(41,sd=0.1)
qplot(x,y)+geom_smooth()
```
- item 1
- item 2
You will have to adjust the height and width to get the size that is suitable for slides
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.