Skip to content

draw_key_rect fails to get color from outline when fill is NA #5385

Closed
@Ductmonkey

Description

@Ductmonkey

Problem:

When using draw_key_rect with a geom that has fill = NA, it fails to catch the outline color and returns an invisible (NA) rectangle.

Minimal reprex:

library(ggplot2)
ggplot(mtcars, aes(disp, color = factor(cyl))) + geom_density(key_glyph = draw_key_rect)

Created on 2023-08-10 with reprex v2.0.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions