Line between columns in grid.table

264 views Asked by At

When I print a table using gridExtra grid.table, I can't make disappear the white line between the columns. I have tried to play with the bg_params :

library(gridExtra)
library(grid)
n=5
d <- data.frame(x=rnorm(n),y=rnorm(n),z=rnorm(n))


mytheme <- ttheme_default(colhead = list(bg_params=list(fill="#DDEBF7", col="#DDEBF7",lwd=0))
)
grid.table(d, theme = mytheme)

But I still get white line between the columns

1

There are 1 answers

1
Z.Lin On BEST ANSWER

You can set the line colour of the core table area to match the two default fill colours:

mytheme <- ttheme_default(colhead = list(bg_params=list(fill="#DDEBF7", col="#DDEBF7",lwd=0)),
                          core = list(bg_params = list(col = c("grey95", "grey90")))
)
grid.table(d, theme = mytheme)

table