Skip to content

Guide colorsteps creates an ugly, large NA box #3876

Closed
@clauswilke

Description

@clauswilke

Technically another issue against my PR #3864. I made this figure yesterday and I thought the guide looks ugly. Why is the box representing NA so large? Should NA be shown at all by default? Should it maybe be shown with a little gap? Is this correct at all?

library(ggplot2)

set.seed(4393)
dsmall <- diamonds[sample(nrow(diamonds), 1000), ]

ggplot(dsmall, aes(x, y)) +
  geom_density_2d_filled(aes(fill = after_stat(level_high))) +
  scale_fill_viridis_c(guide = "colorsteps")

Created on 2020-03-09 by the reprex package (v0.3.0)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions