Skip to content

Heads up: duplicate aesthetics will get warning #571

@teunbrand

Description

@teunbrand

Hi Barett and other maintainers,

We recently did a revdepcheck in ggplot2 and found that a new check we introduced got triggered by GGally. In particular we now throw a warning which violates this test:

expect_silent(
ggsurv(sf.kid, CI = TRUE, surv.col = c("black", "red", "blue", "green"))
)

I believe the warning is thrown because lty is used twice in these layer definitions, once in aes() and once as a fixed parameter:

ggally/R/ggsurv.R

Lines 333 to 343 in d21c6d6

pl <- pl +
geom_step(
aes(y = .data$up, lty = .data$group, col = .data$group),
lty = stepLty,
linewidth = size.ci
) +
geom_step(
aes(y = .data$low, lty = .data$group, col = .data$group),
lty = stepLty,
linewidth = size.ci
)

We've no immediate plans to release a ggplot2 that includes the check, but just wanted to simply flag this for the future.

Cheers!

Metadata

Metadata

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