This question is an extension of this question.
I am plotting a rather large gglot in Shiny.
Using renderPlot(width = 1500, height = 1000, ...
You didn't post your theme.css
, but the issue is probably that the css overflow
argument is set to scroll
for the div
holding the plots in you app's css. This forces scrollbars if the div is too small for its content.
The default height
for a plotOutput
is set to 400px, so in your renderPlot
if you set the height to 1000 you will get a scrollbar if the overflow of the div is set to scroll.
Try setting the height argument of plotOutput
to 1000px or more for example:
#add all the tabPanels to the list
for (i in 2:(number_of_tabPages+1)){
tabs[[i]]=tabPanel(paste0("Tab",i-1),plotOutput(paste0("plot",i-1),height="1100px"))
}
Should give something like this:
You can also try finding what sets the overflow
to scroll
for this div. I'm just suspecting this because when the code is run without the theme.css
it looks fine without changing your code.