I am trying to plot 6
ggplot
objects with patchwork
such that it plots 3
ggplot objects in each row. Upon running the code below; I get an error while running Final.Plot
. How can this be fixed? On a side note the object patchwork
works fine on its own as intended.
patchwork = (ggplot1+ ggplot2 + ggplot3) / (ggplot4 + ggplot5 + ggplot6)
Final.Plot = patchwork +
plot_annotation(tag_levels = 'A') & theme(legend.position = "bottom") +
plot_layout(guides = "collect")
Error
'ncol' Error: Theme element `ncol` is not defined in the element hierarchy.