Plot output horizontal alignment

532 views
Skip to first unread message

Robin Cura

unread,
Jul 8, 2013, 8:46:08 AM7/8/13
to shiny-...@googlegroups.com
Hi,

I'm trying to align some pltos in my output, which is organised with tabPanels :

    mainPanel(
        tabsetPanel(
            tabPanel("Plots",
                plotOutput("tree", width="45%"),
                plotOutput("afc", width="45%"),
                ),
            tabPanel("Tables", tableOutput("table")),
            tabPanel("Maps", verbatimTextOutput("blabla"))
        )
    )

I'd like my 2 plotOutputs (tree and afc) to be on the same line, so that I can plot some other plots under.
I tried putting them on the same paragraph (using HTML("<p>") and also tags$p()), but none of my attempts succeeded.

Any idea ?

Cheers,

Robin

Ramnath Vaidyanathan

unread,
Jul 8, 2013, 9:14:16 AM7/8/13
to shiny-...@googlegroups.com
Try this. It places each plot in a span6 div in a row, which should align them horizontally.

tags$div(class = "row-fluid",
  tags$div(class = "span6", plotOutput("tree")),
  tags$div(class = "span6", plotOutput("afc"))       
)

Robin Cura

unread,
Jul 8, 2013, 9:24:50 AM7/8/13
to shiny-...@googlegroups.com
Works great, thanks a lot,

Robin


2013/7/8 Ramnath Vaidyanathan <ramnath...@gmail.com>

--
You received this message because you are subscribed to the Google Groups "Shiny - Web Framework for R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to shiny-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.
 
 



--
Robin Cura
Ingénieur d'Étude à l'UMR Géographie-cités
ANR TransMonDyn
Reply all
Reply to author
Forward
0 new messages