fill color doesn't match up with legend key
Closed this issue · 4 comments
emitanaka commented
mitchelloharawild commented
I think of the legend for level here as more of a shade rather than fill
colour. If anything, the default fill colour for the box should be
grayscale.
The grayscale colour scheme is for the legend to make sense when the fill
varies in the plot.
…On Thu., 20 Feb. 2020, 08:13 Emi Tanaka, ***@***.***> wrote:
In below example the legend key doesn't have the same fill color.
library(gghdr)
library(ggplot2)
ggplot(faithful, aes(y = eruptions)) +
geom_hdr_boxplot(prob = c(.5, 0.99), fill = "blue") +
theme_minimal()
[image: download]
<https://user-images.githubusercontent.com/7620319/74885409-9154b100-53c9-11ea-88e5-6a90fb7ab0a7.png>
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#15>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AD3BJF4BLE3FWJAIQCVMBCLRDW4IXANCNFSM4KYDRVMA>
.
emitanaka commented
mitchelloharawild commented
I don't feel strongly about the single colour case, but my two reasons not to do it are:
- Inconsistency
- I think it's hard 🙈
If you wanted to try, feel free. I think Rob has some stronger opinions about the single colour case.
thomas-fung commented
In an earlier attempt, it was possible to match the legend key and (most of) the fill colour. Obviously the code would need to be flexible enough to allow an arbitrary number of shades and the way we did it was to scale a particular attribute of a colouring system to create different level of shades. But it would fall apart if the fill colour has a low or zero value for such attribute such as "black". We can obviously manage these cases but it would create inconsistency just like Mitch said.