简体   繁体   中英

How to Change Table Background with tableGrob in GridExtra

I have this Gridmesh in the Background of my plottet table. How do i Change the Background other then with theme

https://imgur.com/a/6s5tM0j

cor.t=mydata

tt3 <- ttheme_minimal(
base_size = 8,
core=list(bg_params = list(fill = paste(substr(HeaderFarbe[n+1],
start = 1, stop = 7),"4D",sep=""),
col=HeaderFarbe[n+1]),
fg_params=list(fontface=3)),
colhead=list(fg_params=list(col=HeaderFarbe[n+1], fontface=4L)),
rowhead=list(fg_params=list(col="red", fontface=3L)))

plot(tableGrob(cor.t ,theme=tt3))

There's no background if you use grid::grid.draw(tableGrob()) (or grid.table() directly). plot.gtable , adding the grey background, is meant for debugging only.

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