Skip to content

Commit

Permalink
Fix for 'ggplot2' 3.5.2 deprecation
Browse files Browse the repository at this point in the history
  • Loading branch information
aphalo committed Nov 13, 2024
1 parent 82c0c8a commit d34c4e0
Show file tree
Hide file tree
Showing 24 changed files with 164 additions and 188 deletions.
2 changes: 2 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ editor_options:

# ggspectra 0.3.14

- Ensure compatibility with upcoming 'ggplot2' 3.5.2: Use `geom_linerange()`
instead of `geom_errorbarh()` as default in `stat_wb_hbar()`.
- Make the order of parameters of layer functions consistent with those in
'ggplot2'. This affects partial matching of argument names!
- Add manual support for scale transformations, needed for label construction
Expand Down
6 changes: 3 additions & 3 deletions R/stat-wb-hbar.R
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
#'
stat_wb_hbar <- function(mapping = NULL,
data = NULL,
geom = "errorbarh",
geom = "linerange",
position = "identity",
...,
w.band = NULL,
Expand Down Expand Up @@ -155,10 +155,10 @@ StatWbHbar <-
mydata <- trim_tails(data[["x"]], data[["y"]], use.hinges = TRUE,
low.limit = range[1],
high.limit = range[2])
yint.tmp <- integral.fun(mydata[["x"]] , mydata[["y"]] )
yint.tmp <- integral.fun(mydata[["x"]] , mydata[["y"]])
ymean.tmp <- yint.tmp / wl_expanse(wb)
integ.df <- rbind(integ.df,
data.frame(x = midpoint(mydata[["x"]] ),
data.frame(x = midpoint(mydata[["x"]]),
wb.xmin = min(wb),
wb.xmax = max(wb),
wb.ymin = min(data[["y"]]),
Expand Down
2 changes: 1 addition & 1 deletion man/stat_wb_hbar.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions tests/testthat/_snaps/stats-label-peaks/stat-label-peaks-sun.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 13 additions & 13 deletions tests/testthat/_snaps/stats-label-peaks/stat-label-peaks.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit d34c4e0

Please sign in to comment.