簡體   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