我一直在阅读这ggplot2两个功能的文档.我想知道使用每个函数(facet_wrap()和facet_grid())的差异和正确的情况是什么.
ggplot2
facet_wrap()
facet_grid()
library(ggplot2) p <- qplot(displ, hwy, data = mpg) p + facet_wrap(~ cyl) p + facet_grid(~ cyl)
我提供这个小例子作为起点.差异似乎是包裹使得情节更加自主,并且网格使得一个情节全部在一起.