I've a huge plot, I want to add a table on the right side corresponding to the y axis.
I tried grid arrange, gtable, tableGrob but none worked.(the table does not juxtapose with the y-axis lable) (original data has 35 rows, it sometimes exceeds the plot area).
plt <- ggplot(aaaa, aes(col, seq, label = ltr, fill = fill_calc2)) +
geom_text(size = 2.5, family = "mono",
colour=factor(aaaa$colr), fontface ="bold") +
theme_minimal() +
labs(x=NULL, y=NULL) +
theme(panel.grid.major=element_blank(),
panel.grid.minor=element_blank(),
axis.text.y = element_text(size = 8, family = "mono",color ="black",hjust = 0),
axis.text.x = element_text(face= "bold", size = 5,color ="black"),
plot.margin = (unit(c(.5, .5, 2, .5), "cm")),
plot.background = element_rect(fill = "white"),
axis.ticks.x = element_line(color = "black"))
grid.arrange(plt, table, ncol = 2)
The plot and table should align (heights and labels must match). plot should be of a greater width than table.
Thank you!

