I am trying to resize a plotOutput ui object in shiny
library(shiny)
ui <- fluidPage(
fluidRow(
column(6, numericInput('save.height', "Save height (mm)", value = 50)),
column(6, numericInput('save.width', "Save width (mm)", value = 43))),
plotOutput('plot_display', width = '50mm', height = '43mm'))
server <- function(input, output) {
output$plot_display <- renderPlot({
ggplot(iris, aes(x = Species, y = Petal.Length)) +
stat_summary(geom = 'bar', fun.y = mean) +
geom_point() +
theme(aspect.ratio = 1)
})
}
shinyApp(ui, server)
I haven't been able to find something equivalent to updateNumericInput() to update the values dynamically in plotOutput
