Skip to content

adding a caption to labs results in an error (ggplot version 3.4.2) #5322

@UliSchopp

Description

@UliSchopp

In former versions it was prossible to add a caption to a plot. With version 3.4.2 this results in the following error
Error in titleGrob(label, x, y, hjust = hj, vjust = vj, angle = angle, : unused argument (expand_y = TRUE)

library(ggplot2)
basic <- ggplot(mtcars, aes(wt, mpg, colour = factor(cyl), shape = factor(vs) )) +
  geom_point() +
  labs(title = "A",
       caption = "Caption") 
basic

This is the result from ggplot2 version 3.4.1:
Rplot

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions