如何在闪亮的浏览器模式下调试ggplot?

阿比舍克

我们曾经使用浏览器检查无功值,但是当ggplot没有呈现期望的图形时,我们如何在无功模式下调试它呢?

library(shiny)

ui <- basicPage(
  plotOutput("plot1", click = "plot_click"),
  verbatimTextOutput("info")
)

server <- function(input, output) {
  output$plot1 <- renderPlot({
    browser() # Here, the browser stops but when run the below line, cannot see the plot in plots tab
    plot(mtcars$wt, mtcars$mpg) # or ggplot ...both not rendering plot in browser mode
  })

  output$info <- renderText({
    paste0("x=", input$plot_click$x, "\ny=", input$plot_click$y)
  })
}

shinyApp(ui, server)
杀人的

实际上,您可以要求打开新设备:

Listening on http://127.0.0.1:7460
Called from: renderPlot(...)
Browse[1]> plot(mtcars$wt, mtcars$mpg) ## won't plot
Browse[1]> dev.new() ## opens a new window
Browse[1]> plot(mtcars$wt, mtcars$mpg) ## now plots

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

关闭浏览器后如何退出调试模式?

如何在独立模式下调试webdriverio?

如何在浏览器中调试angularjs的$ rootScope对象

如何在浏览器中调试Jest测试?

如何在浏览器中调试“混合内容”错误?

如何在Chrome浏览器中调试AngularJS

如何在实时模式下安装Chromium浏览器?

如何在浏览器的调试器中调试动态加载的JavaScript(使用jQuery)?

如何在发布模式下调试Android应用?

如何在设计模式下调试WPF用户控件?

VS 2019. 内部 Web 浏览器作为调试模式下的默认浏览器

如何在Google Chrome浏览器中启动JavaScript调试器?

如何在Google Chrome浏览器中激活JavaScript调试器?

如何在浏览器X中禁用私人浏览/隐身模式?

如何在 Open Liberty 服务器开发模式下调试我的测试(使用 Liberty-maven-plugin)并打开/关闭调试器?

如何在Chrome浏览器中触发deviceready事件(尝试调试phonegap项目)

CSS-如何在Google Chrome浏览器中调试活动/选定的输入元素

如何在Samsung Galaxy S5默认浏览器上调试CSS网站?

如何在chrome浏览器中调试nativescript应用并在chrome中查看输出

如何在暗模式下使用Google Chrome浏览器预览PDF?

如何在IE11中恢复“浏览器模式”?

如何在Windows 8上使Google Chrome浏览器回到桌面模式

如何在浏览器JavaScript中检测OS X是否处于暗模式?

如何在浏览器中检测操作系统是否处于暗模式?

运行Web项目时如何在Visual Studio中使用浏览器隐身模式

如何在站点的Edge浏览器(版本83.0.478.61及更高版本)中启用IE模式?

如何在Android中将浏览器意图设置为全屏模式?

如何在谷歌浏览器隐身模式下打开 jupyter

如何在旧版本的Nautilus中默认启动浏览器模式