[英]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.