I have a fluidRow with a plot rendered in one of the columns. I would like to know how to center the plot when I have manually specified the plot width via the renderPlot({crea
align="center"
can be included within the column
expression (not within plotOutput
though).
e.g.
fluidRow(
column(8, align="center",
plotOutput('plot1')
)
)
You could use align="center"
as part of your plotOutput()
function. So your ui.R would like this:
ui.R
setwd("C:/Users/Nate/Documents/R Working Directory/appFolder/example")
shinyUI(fluidPage(
titlePanel("Test"),
sidebarLayout(
sidebarPanel(
p('stuff here')
),
mainPanel(
tabsetPanel(id = 'tabs1',
tabPanel("main",
fluidRow(
column(8,
plotOutput('plot1',align="center")),
column(4,
p('2nd column'))),
fluidRow(
p("2nd row of viewing area"))
),
tabPanel("second",
p("main viewing area")),
tabPanel("third",
p('main viewing area')
)
))
)
))