繁体   English   中英

闪亮的应用程序中的情节高度灵活

[英]Flexible height of plot in shiny app

我正在寻找一种根据input$..值更改plotOutput()height参数的方法。

有什么建议么?

塞缪尔

干得好:

library(shiny)

shinyApp(
  ui = fluidPage(
    numericInput("height", "height", 300),
    plotOutput("plot", height = "auto")
  ),

  server = function(input, output, session) {
    output$plot <- renderPlot({
      plot(1:10)
    },
    height = function(x) input$height)
  }
)

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM