Skip to content

Legend hiding rules a bit too strict? #212

Closed
@cpsievert

Description

@cpsievert

I discovered this example via the checkmark on #161 titled "geom_rect()"

This works fine:

base <- ggplot(mtcars) + 
  geom_density(aes(x=disp, group=cyl, fill=factor(cyl)), alpha=0.6, adjust=0.75) 

But once I add a "rect layer", the legend goes away (it shouldn't):

base + annotate("rect", xmin=100, xmax=200, ymin=0, ymax=0.02, alpha=0.2, fill="red")

Metadata

Metadata

Assignees

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