I have noticed that whenever I define height in renderPlot(), and put the resulting output in a box(), the plot overflows the box.
I have seen that the solution for this is to define the height in box() as well, but I cannot do this in my case as the plot height is reactive and dynamically generated. I think it's not possible to use reactive values directly in the shiny UI.
The solution with dynamic UI elements is renderUI and uiOutput. The entire ui component is placed inside renderUI and uses any reactive values. With input changes it generates the UI and uiOutput displays it.
I have noticed that whenever I define height in renderPlot(), and put the resulting output in a box(), the plot overflows the box.
I have seen that the solution for this is to define the height in box() as well, but I cannot do this in my case as the plot height is reactive and dynamically generated. I think it's not possible to use reactive values directly in the shiny UI.