Closed fkohrt closed 1 week ago
@fkohrt, thanks for pointing this out! I have updated the code to get rid of the warning (404d12a). You can install the most recent development version of ggHoriPlot
by running devtools::install_github("rivasiker/ggHoriPlot")
.
Awesome, thank you very much! I was very delighted to see that a ggplot2 package for horizon plots exists! :)
Running it again, I discovered yet another deprecation:
withr::with_options(list(
warnPartialMatchArgs = TRUE,
warnPartialMatchDollar = TRUE,
warnPartialMatchAttr = TRUE,
warn = 2,
lifecycle_verbosity = "error"
), {
plt <- faithful$eruptions |>
density() |>
(\(dat) data.frame(x = dat$x, y = dat$y))() |>
ggplot2::ggplot(ggplot2::aes(x = x, y = y)) +
ggHoriPlot::geom_horizon(
origin = "min"
) +
ggplot2::coord_cartesian(
ylim = c(-0.5, 0.5)/0.5 + 0.5
) +
ggHoriPlot::scale_fill_hcl()
print(plt)
})
...giving:
Error:
! The `scale_name` argument of `discrete_scale()` is deprecated as of ggplot2 3.5.0.
Backtrace:
▆
1. ├─withr::with_options(...)
2. │ └─base::force(code)
3. └─ggHoriPlot::scale_fill_hcl()
4. └─ggplot2::discrete_scale("fill", "hcl", palette = pal, ...)
5. └─ggplot2:::deprecate_soft0("3.5.0", "discrete_scale(scale_name)")
6. └─lifecycle::deprecate_soft(..., user_env = user_env)
7. └─lifecycle:::deprecate_stop0(msg)
8. └─rlang::cnd_signal(...)
@fkohrt, again, thank you! These deprecations are sometimes tricky to catch. I have already updated the code (bb2da5f3117013876859b27bc9c8338e56199f5a). Please, do let me know if you find something else!
Awesome, thanks, now it runs just fine :)
Running the following:
...leads to the following warning message: