Skip to content

Patchwork doesn't work with ggplot 3.4.4.9000 #342

Description

@Gen4536

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

Activity

  1. thomasp85 commented on Dec 11, 2023

    @thomasp85
    Owner

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

  2. anita-wray commented on Mar 6, 2024

    @anita-wray

    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

  3. Rong-ao commented on Mar 7, 2024

    @Rong-ao

    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?

  4. davidhodge931 commented on Mar 7, 2024

    @davidhodge931

    Update patchwork to latest version

  5. JiahaoWongg commented on Mar 26, 2024

    @JiahaoWongg

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

  6. Elo-mars commented on Feb 9, 2026

    @Elo-mars

    @JiahaoWongg , still working in Feb 2026! thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions