Skip to content

Patchwork of patwchrok does not handle title properly #434

@dmongin

Description

@dmongin

related to #432, I noticed another error:

If I do the following to avoid the legend error (as suggested here https://stackoverflow.com/questions/79663257/how-to-handle-legend-properly-with-patchwork/79663866?noredirect=1#comment140511944_79663866)

p1 <- ggplot(iris,aes(Sepal.Length,Sepal.Width,color = Species))+
  geom_point() 

first_plot <- p1 + 
  inset_element(p1 + guides(color = "none"), 
                right = 0.5,left = 0,
                bottom = .55,top =  1) + 
  plot_annotation(title = "plouf1")

Image

p2 <- ggplot(iris,aes(Sepal.Length,Sepal.Width,color = Petal.Width))+
  geom_point()

second_plot <- p2 + inset_element(p2+ guides(color = "none"), 
                                  right = 0.5,left = 0,
                                  bottom = .55,top =  1) + 
  plot_annotation(title = "plouf2")

Image

Each plot has his title. But when doing:

first_plot + second_plot

Image

I just have the first title, and even worst:

(first_plot + second_plot)/(first_plot + second_plot)

Image

Here I have no title anymore

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