I am trying to plot a table with the values from a dataframe. I am not sure of what approach to take using ggplot2.
I am also trying one approach using gridextra::grid.table()
and tableGrob()
functions and both are working similarly.
For example: I plot iris
as a table using following code
library(gridExtra)
library(grid)
d <- head(iris, 3)
g <- tableGrob(d)
grid.draw(g)
When I plot this data using grid.draw
, why I am getting row numbers 1 to 3 along with the table and how can I work on removing these numbers and change font type and background colors. Please guide!
Also guide me to the approach using ggplot2
Your help will be appreciated!