我有一个由facet_grid
创建的2x2网格,其中包含自由比例尺(请参见示例)。我想在网格的第二行图形上使用对数刻度,但不在第一行上使用。
示例代码:
data("mtcars")
ggplot(data = mtcars, aes(y = mpg, x = as.factor(cyl))) + geom_boxplot() + facet_wrap(~ vs + am, nrow = 2, scales = "free")
scale_y_log10()
似乎做了一些奇怪的事情。这是否有可能,还是我必须使用像 grid.arrange
这样的东西?
grid.arrage
组合它们,或者看看cowplot::plot_grid
以便轻松对齐。 - Axeman