简体   繁体   中英

Align and format text according to plots in R Shiny

I would like to add descriptive text to my plots in Shiny. I am outputting a dynamic number of plots in two columns and I would like to add a third column, like so:

例

However, I can't figure out how to align the text with the plots. Can I use CSS containers or div's? HTML codes are working, but hardcoding a bunch of <br/> 's does not seem smart. Here is a minimal example.

Any help is greatly appreciated.

Just change the htmlOutput line to

htmlOutput(plotname, style="height:400px;")

You can use the Inspect Element context menu of Firefox to find out the height for the plots.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM