You can wrap them in fluidRow
or just list them inside the sametabPanel
shinyApp(
shinyUI(
fluidPage(
mainPanel(
tabsetPanel(
tabPanel("Summary", dataTableOutput("dis")),
tabPanel("Plot",
plotOutput("plot1"),
plotOutput("plot2")
)
)
)
)
),
shinyServer(function(input, output) {
output$plot1 <- renderPlot({
plot(1:10, 1:10)
})
output$plot2 <- renderPlot({
plot(1:10 ,10:1)
})
output$dis <- renderDataTable({})
})
)
Wrapping them in fluidRow
provides easy control over individual plot attributes, such as width,
tabPanel("Plot",
fluidRow(
column(8, plotOutput("plot1")),
column(12, plotOutput("plot2"))
))
source
share