Skip to content

Should element_rect() and element_line() also use linewidth instead of size? #4953

Closed
@yutannihilation

Description

@yutannihilation

#3672 introduced linewidth to Geoms. On the other hand, element_rect() and element_line() still uses size. Do we need to rename them for consistency?

Currently, this doesn't work.

library(ggplot2)

ggplot(mpg, aes(x = hwy, y = cty, color = drv)) +
  geom_point() +
  theme(
    legend.key = element_rect(linewidth = 3, colour = "red")
  )
#> Error in element_rect(linewidth = 3, colour = "red"): unused argument (linewidth = 3)

Created on 2022-08-22 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions