0

I made a ggplot graphic which had 5 facets using facet_wrap.

The sixth is blank, I want to add a table.

ggplot(data = ccdataff, aes(x = 处理, y = mean, color=处理)) +theme_bw()+
    geom_bar(stat = "identity", position =  "dodge",fill="white")+facet_wrap(~植物)

plot 1

plot 2

Brian Tompsett - 汤莱恩
  • 5,753
  • 72
  • 57
  • 129
x g
  • 1
  • 2
  • 2
    Plot each facet as a separate plot in a list, and one plot with table (probably some grid package), then use `cowplot::plot_grid` to put all together. Please provide [reproducible example](http://stackoverflow.com/questions/5963269), and show your existing code. – zx8754 May 25 '18 at 11:52
  • I've answered a similar question before [here](https://stackoverflow.com/questions/28496764/add-textbox-to-facet-wrapped-layout-in-ggplot2/46150040#46150040), with a solution that involved converting the facetted ggplot object into a grob. Would it be relevant for your use case? – Z.Lin May 25 '18 at 13:41
  • Agree with other posters that you will need to use an additional package like `cowplot` or `gridExtra` to do this – Jan Boyer May 25 '18 at 19:49
  • yes,thank you all,ggplot is not enough ,need grid – x g May 27 '18 at 03:54

0 Answers0