1

slidey (rmarkdown) でプロットのグリッドを含むアニメーションを含むプレゼンテーションを作成しています。ビデオボックスはスライドに対して少し大きすぎるので、縮小したいと思います。私のプレゼンテーションは次のようなものです。

---
title: "Adbd"
output: slidy_presentation
---

## Animation

```{r animation1,echo=FALSE,fig.align='center', fig.show='animate', aniopts='controls,width=0.1', fig.height=9, fig.width=9,fig.retina=2}
for(i in 1:2){
  library(ggplot2)
  library(gridExtra)
  p1 <- ggplot(mtcars, aes(wt, mpg))+geom_point()+xlim(1,6)+ylim(9,35)
  p2 <- ggplot(mtcars, aes(wt, mpg))+geom_point()+xlim(1,8)+ylim(9,35)
  p3 <- ggplot(mtcars, aes(wt, mpg))+geom_point()+xlim(1,8)+ylim(6,35)
  p4 <- ggplot(mtcars, aes(wt, mpg, label=rownames(mtcars)))+geom_point()+xlim(1,8)+ylim(9,35)+ geom_text()

  grid.arrange(p1,p2,p3,p4, nrow=2, ncol=2) 
}
```

ビデオ タグの幅をデフォルト値 (864) から 650 程度に減らしたいと考えています。

これまでのところ、私は試しました:

  • 幅パラメーターを aniopts に追加します (効果はありません)。
  • fig.height と fig.width をいじってみる (テキストのサイズを変更する)
  • grid.arrange で高さと幅のパラメーターをいじる (前と同じ)

どんな助けでも大歓迎です。

4

1 に答える 1