Quick question on formatting positions of plots in r Shiny UI.
So far I have made a series of histogram plots in Server.R and they all show perfectly in the UI. The only problem is, is that I want them to line up in 2 rows, 4 to a row. My current code, pasted below, gives me 3 rows! The top one with 4 graphs, the second with 3 graphs (With room to fit a fourth) and then the last row has 1 plot... Where have I gone wrong and is there a better method to layout 8 plots in shiny?
fluidRow(
column(12,
"",
fluidRow(
column(3,
plotOutput("PlotHy")#,
),
column(width = 3,
plotOutput("PlotMe")),
column(width = 3,
plotOutput("PlotEthane")),
column(width = 3,
plotOutput("PlotEthylene")),
column(width = 3,
plotOutput("PlotCO")),
column(width = 3,
plotOutput("PlotCO2")),
column(width = 3,
plotOutput("PlotO")),
column(width = 3,
plotOutput("PlotN"))
)
)
),
Thanks, James
Just explicit the row separation:
shinyUI(
fluidPage(
titlePanel("stack overflow question"),
fluidRow(
column(12,
"",
fluidRow(
column(3,
plotOutput("PlotHy")),
column(width = 3,
plotOutput("PlotMe")),
column(width = 3,
plotOutput("PlotEthane")),
column(width = 3,
plotOutput("PlotEthylene"))
), fluidRow(
column(width = 3,
plotOutput("PlotCO")),
column(width = 3,
plotOutput("PlotCO2")),
column(width = 3,
plotOutput("PlotO")),
column(width = 3,
plotOutput("PlotN"))
)
)
)
))
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With