交互式R减价中ggvis绘图的大小错误

交互式R减价中ggvis绘图的大小错误,r,plot,shiny,r-markdown,ggvis,R,Plot,Shiny,R Markdown,Ggvis,我试图在交互式R标记文件中添加交互式ggvis绘图。它工作得很好,除了绘图的大小大于指定的空间,我总是得到一个“剪切”绘图和滚动条。我尝试了chunk选项(out.height和fig.height)或ggvis set_选项,但没有成功。下面是一个例子。 谢谢 --- title: "Untitled" runtime: shiny output: html_document --- ```{r, echo = FALSE} library(ggvis) mtcars %>% gr

我试图在交互式R标记文件中添加交互式ggvis绘图。它工作得很好,除了绘图的大小大于指定的空间,我总是得到一个“剪切”绘图和滚动条。我尝试了chunk选项(out.height和fig.height)或ggvis set_选项,但没有成功。下面是一个例子。 谢谢

---
title: "Untitled"
runtime: shiny
output: html_document
---

```{r, echo = FALSE}
library(ggvis)
mtcars %>%
  group_by(am) %>%
  ggvis(~ x_, ~ count_/sum(count_), fill = ~am) %>%
  compute_bin(~mpg, width = input_slider(min = 1, max = 10)) %>%
    layer_bars(stack = FALSE, opacity := 0.5) %>%
  add_axis("x", title = "mpg", grid = FALSE) %>%
  add_axis("y", title = "Proportion", grid = FALSE, format = "%")
```