Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable to control more aesthetics in bleached layer #76

Merged
merged 8 commits into from
Dec 28, 2018

Conversation

yutannihilation
Copy link
Owner

@yutannihilation yutannihilation commented Dec 28, 2018

Fix #62

Replace unhighlighted_colour with unhighlighted_params.

library(gghighlight)
#> Loading required package: ggplot2

set.seed(2)
d <- purrr::map_dfr(
  letters,
  ~ data.frame(
    idx = 1:400,
    value = cumsum(runif(400, -1, 1)),
    type = .,
    flag = sample(c(TRUE, FALSE), size = 400, replace = TRUE),
    stringsAsFactors = FALSE
  )
)

ggplot(d) +
  geom_line(aes(idx, value, colour = type), size = 3) +
  gghighlight(max(value) > 19,
              unhighlighted_aes = list(size = 0.4))
#> label_key: type

Created on 2018-12-28 by the reprex package (v0.2.1)

@yutannihilation
Copy link
Owner Author

  1. If specified in unhighlighted_params, use it.
  2. If default_aes is NA, use NA
  3. Otherwise, use the default grey.

@yutannihilation yutannihilation merged commit 0e0e0d4 into master Dec 28, 2018
@yutannihilation yutannihilation deleted the bleach-aes branch December 28, 2018 11:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant