我很难让我的情节图适合它的flexdashboard容器。底部被切掉了。
考虑以下reprex:
---
title: "Plotly Flexdashboard Conflict"
output:
flexdashboard::flex_dashboard:
source_code: embed
---
Column
---
### In this tab, the plot is pushed out of bonds by the selectize items.
```{r}库(Tidyverse)
库(绘图)
库(Gapminder)
库(Flexdashboard)
gapminder_highlighted <-
highlight_key(gapminder1:408,,~country,“选择国家”)
gapminder_ggplot <-
gapminder_highlighted %>%
ggplot(aes(x =年,y= lifeExp,组=国家),alpha = 0.2) +
geom_line()
gapminder_plotly <- ggplotly(gapminder_ggplot)
高亮显示(gapminder_plotly,dynamic = T,selectize = T,persistent = T)
### Without selectize, all is well. The x axis is visible.
```{r}gapminder_plotly
Column
---
### When plots overflow, flexdashboard is meant to add a scrollbar. E.g.
```{r}plot(汽车)
绘图(Nhtemp)
plot(汽车)
绘图(Nhtemp)
### Although this does not actually work for all elements. E.g. Text generated from code chunks fails to trigger slider addition:
```{r}cat( rep("Flex不响应此处的文本溢出。",100)
print(“此行被隐藏”)
这里的输出在Rpubs上,所以你可以看看:https://rpubs.com/kenwosu/661556
第一个gapminder图被选择项推出边界。而且flexdashboard不会像它应该的那样触发添加垂直滚动条。

任何帮助都将不胜感激!
发布于 2020-09-17 23:04:49
这个看起来是不是好一点?我将y轴更改为从0开始,它看起来显示得更清晰了一点。我刚刚将+ expand_limits(y = 0)添加到了ggplot图的末尾。我尝试过使用ggplotly(),但似乎是ggplot图形有图形问题。
---
title: "Plotly Flexdashboard Conflict"
output:
flexdashboard::flex_dashboard:
source_code: embed
---
Column
---
### In this tab, the plot is pushed out of bonds by the selectize items.
```{r}库(Tidyverse)
库(绘图)
库(Gapminder)
库(Flexdashboard)
gapminder_highlighted <-
highlight_key(gapminder1:408,,~country,“选择国家”)
gapminder_ggplot <-
gapminder_highlighted %>%
ggplot(aes(x =年,y= lifeExp,组=国家),alpha = 0.2) +
geom_line() + expand_limits(y = 0)
gapminder_plotly <- ggplotly(gapminder_ggplot)
高亮显示(gapminder_plotly,dynamic = T,selectize = T,persistent = T)
### Without selectize, all is well. The x axis is visible.
```{r}gapminder_plotly
Column
---
### When plots overflow, flexdashboard is meant to add a scrollbar. E.g.
```{r}plot(汽车)
绘图(Nhtemp)
plot(汽车)
绘图(Nhtemp)
### Although this does not actually work for all elements. E.g. Text generated from code chunks fails to trigger slider addition:
```{r}cat( rep("Flex不响应此处的文本溢出。",100)
print(“此行被隐藏”)
https://stackoverflow.com/questions/63927511
复制相似问题