Skip to content

Annotation does not appear unless fill is set #120

@hadley

Description

@hadley
labs <- expression( , NC==17, PG, PG==13, R)
ggplot(data = movies, aes(x = rating, fill = NA)) +
  geom_density(alpha = I(0.2), aes_string(fill = "mpaa")) +
  scale_fill_discrete(name = "mpaa", breaks = levels(movies$mpaa),
     labels = labs, formatter = parse) +
  geom_text(x = Inf, y = Inf, label = "Test", hjust = 1, vjust = 1)

# Annotation in top-right corner disappears
ggplot(data = movies, aes(x = rating)) +
  geom_density(alpha = I(0.2), aes_string(fill = "mpaa")) +
  scale_fill_discrete(name = "mpaa", breaks = levels(movies$mpaa),
     labels = labs, formatter = parse) +
  geom_text(x = Inf, y = Inf, label = "Test", hjust = 1, vjust = 1)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behavior

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions