thomasp85 / patchwork

The Composer of ggplots
https://patchwork.data-imaginist.com
Other
2.42k stars 157 forks source link

Patchwork doesn't work with ggplot 3.4.4.9000 #342

Closed Ari04T closed 6 months ago

Ari04T commented 7 months ago

As stated in the title. With ggplot 3.4.4 patchwork works just fine, but with the developmental version 3.4.4.9000 I get the following error

pak::pak("tidyverse/ggplot2")
install.packages("patchwork")

library(ggplot2)
library(patchwork)

p1 <- ggplot(mtcars) + geom_point(aes(mpg, disp))
p2 <- ggplot(mtcars) + geom_boxplot(aes(gear, disp, group = gear))

p1 + p2

Error in Ops.data.frame(guide_loc, panel_loc) : 
  ‘==’ only defined for equally-sized data frames
thomasp85 commented 7 months ago

Yes, there has been some internal changes in the development version of ggplot2 affecting patchwork. This will get fixed

anita-wray commented 4 months ago

It seems that I am running into the same issue with ggplot2_3.5.0.

Error in Ops.data.frame(guide_loc, panel_loc) : ‘==’ only defined for equally-sized data frames

Rong-ao commented 4 months ago

It seems that I am running into the same issue with ggplot2_3.5.0.

Error in Ops.data.frame(guide_loc, panel_loc) : ‘==’ only defined for equally-sized data frames

I also met the same issue when I was using ggplot2_3.5.0 and patchwork_1.1.3., and this issue still came out after I change the version of ggplot2 into 3.4.4 @anita-wray Did you fixed this problem?

davidhodge931 commented 4 months ago

Update patchwork to latest version

JiahaoWongg commented 3 months ago

devtools::install_github("thomasp85/patchwork") and restart R work for me!