You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If I run the code below the common legend at the bottom of the combined plot is not centered but left aligned. If I run the code without attaching cowplot the ggarange works as expected.
Note: I chose ggarange over grid_arrange for the convenient common.legend option.
library(tidyverse)
library(ggpubr)
library(cowplot)
#> #> Attaching package: 'cowplot'#> The following object is masked from 'package:ggpubr':#> #> get_legend
theme_set(theme_cowplot())
p1<-iris %>%
ggplot(aes(x=Sepal.Width,y=Petal.Width,color=Species)) +
geom_point() + coord_fixed()
p2<-iris %>%
ggplot(aes(x=Sepal.Width,y=Petal.Width,color=Species)) +
geom_point() + coord_fixed()
ggarrange(p1,p2,ncol=2,
labels=c("A","B"),
common.legend=T,
legend="bottom")
If I run the code below the common legend at the bottom of the combined plot is not centered but left aligned. If I run the code without attaching cowplot the ggarange works as expected.
Note: I chose ggarange over grid_arrange for the convenient common.legend option.
Created on 2022-04-12 by the reprex package (v2.0.1)
The text was updated successfully, but these errors were encountered: