小编Jim*_*Jim的帖子

R: facet_wrap does not render correctly with ggplotly in Shiny app

When I do a facet_grid in ggplotly() for a Shiny App, with a large number of faceting groups, the plot is messed up. However it works correctly outside Shiny.

How can I fix this?
I suspect it is linked to the Y scale but I couldn't find the solution.


Here's a reproducible example based on diamonds example from plotly.

Comparison of Shiny vs non Shiny outputs : Comparison of facet_grid outside and within Shiny

Code

Outside Shiny:

library(ggplot2)

data(diamonds, …
Run Code Online (Sandbox Code Playgroud)

r shiny facet-grid ggplotly

5
推荐指数
1
解决办法
3317
查看次数

标签 统计

facet-grid ×1

ggplotly ×1

r ×1

shiny ×1