首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >图在闪亮的应用程序中被移动。

图在闪亮的应用程序中被移动。
EN

Stack Overflow用户
提问于 2017-07-19 09:34:13
回答 1查看 382关注 0票数 0

这就是我的例子:

代码语言:javascript
复制
library(shiny)
library(ggplot2)
library(ggiraph)

df <- data.frame(achseX = c("A", "b"), achseY = c(12, 22))

server <- function(input, output) {
  output$plot <- renderggiraph({
    gg <- ggplot(data = df) + geom_bar_interactive(aes(tooltip = achseY, x = achseX, y = achseY), stat = "identity") +
      theme_minimal()
    return(ggiraph(code = print(gg), selection_type = "multiple", zoom_max = 4,
                   hover_css = "fill:#FF3333;stroke:black;cursor:pointer;",
                   selected_css = "fill:#FF3333;stroke:black;"))
  })
}

ui <- fluidPage(
  "The plot should start right under this text.",
  ggiraphOutput("plot") ,
  "This is where the plot should end."
)

shinyApp(ui = ui, server = server)

当我启动应用程序时,结果如下:

我添加了文本行,以显示应将情节放置在何处。正如你所看到的,情节被转移到另一个位置。同样的事情发生在我开始这些闪亮的例子时:

代码语言:javascript
复制
# example 1: 
shiny::runApp(appDir = system.file("shiny/crimes", package = "ggiraph"), display.mode = "showcase")
# example 2:
shiny::runApp(appDir = system.file("shiny/cars", package = "ggiraph"), display.mode = "showcase")

我漏掉了什么吗?我怎么才能把这个阴谋弄到正确的位置?

编辑:

会议信息:

代码语言:javascript
复制
R version 3.4.0 (2017-04-21)
Platform: x86_64-w64-mingw32/x64 (64-bit)
Running under: Windows Server 2008 R2 x64 (build 7601) Service Pack 1

Matrix products: default

locale:
[1] LC_COLLATE=German_Germany.1252  LC_CTYPE=German_Germany.1252    LC_MONETARY=German_Germany.1252
[4] LC_NUMERIC=C                    LC_TIME=German_Germany.1252    

attached base packages:
[1] stats     graphics  grDevices utils     datasets  methods   base     

other attached packages:
[1] gdtools_0.1.4 ggiraph_0.4.0 ggplot2_2.2.1 shiny_1.0.3  

loaded via a namespace (and not attached):
 [1] zip_1.0.0         Rcpp_0.12.11      compiler_3.4.0    plyr_1.8.4        R.methodsS3_1.7.1 R.utils_2.5.0    
 [7] base64enc_0.1-3   tools_3.4.0       digest_0.6.12     uuid_0.1-2        jsonlite_1.5      tibble_1.3.3     
[13] gtable_0.2.0      rlang_0.1.1       DBI_0.7           yaml_2.1.14       officer_0.1.4     dplyr_0.5.0      
[19] xml2_1.1.1        htmlwidgets_0.8   grid_3.4.0        R6_2.2.2          rvg_0.1.4         purrr_0.2.2.2    
[25] magrittr_1.5      scales_0.4.1      htmltools_0.3.6   assertthat_0.2.0  mime_0.5          xtable_1.8-2     
[31] colorspace_1.3-2  httpuv_1.3.5      labeling_0.3      lazyeval_0.2.0    munsell_0.4.3     R.oo_1.21.0  
EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2017-07-27 08:35:33

这是RStudio和Internet中的可视化错误。它在谷歌Chrome上运行得很好。不过,无法在上测试。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/45186559

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档