Skip to content

Commit

Permalink
Compatibility with ggplot 3.5 (#102)
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaud-feldmann authored Mar 3, 2024
1 parent 90142d1 commit 5e7bc0a
Show file tree
Hide file tree
Showing 128 changed files with 303 additions and 26 deletions.
8 changes: 7 additions & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,12 @@
# disaggR 1.0.5.3
* Compatibility with ggplot 3.5.0 : Removed the "scale\_name" argument within scales that is now deprecated, new test snapshots (PR #102).

# disaggR 1.0.5.2
* Nothing changed besides the maintener.

# disaggR 1.0.5.1
* Internal change to check package version with character instead of numeric.
* Internal minor change to in_disaggr (incohesive parameters)
* Internal minor change to in\_disaggr (incohesive parameters)
* A more informative error message if one tries to differentiate a time-series with only one observation
* A more informative error message if the rank becomes imperfect after decorrelation

Expand Down
15 changes: 8 additions & 7 deletions R/plot.R
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,8 @@ ggscatter <- function(object,show.legend, theme, start, end, xlab,ylab,

# These are the parts before and after the coefficients calc window
}
g <- g + ggplot2::continuous_scale("colour","gradient",function(x) col(length(x)),
g <- g + ggplot2::continuous_scale("colour",
palette = function(x) col(length(x)),
limits = lims,
breaks = break_arrows(as.numeric(time(object)[-1])),
minor_breaks = numeric(),
Expand Down Expand Up @@ -704,8 +705,8 @@ autoplot_with_lf <- function(object, xlab, ylab,
lims = gglims(hfbench),
verysmall = getOption("ts.eps")/frequency(model$hfserie),
...) +
ggplot2::discrete_scale("colour","hue",col,na.translate = FALSE) +
ggplot2::discrete_scale("linetype","hue",lty,na.translate = FALSE) +
ggplot2::discrete_scale("colour", palette = col,na.translate = FALSE) +
ggplot2::discrete_scale("linetype", palette = lty,na.translate = FALSE) +
ggplot2::ggtitle(main)
}

Expand Down Expand Up @@ -781,7 +782,7 @@ autoplot.tscomparison <- function(object, xlab = NULL, ylab = NULL,
start = start, end = end,
xlab = xlab, ylab = ylab, ...) +
ggplot2::labs(fill=type_label) +
ggplot2::discrete_scale("fill","hue",col,na.translate = FALSE) +
ggplot2::discrete_scale("fill", palette = col,na.translate = FALSE) +
ggplot2::ggtitle(main)
}
else switch(attr(object,"func"),
Expand All @@ -791,7 +792,7 @@ autoplot.tscomparison <- function(object, xlab = NULL, ylab = NULL,
start = start, end = end,
xlab = xlab, ylab = ylab, ...) +
ggplot2::labs(colour=type_label) +
ggplot2::discrete_scale("colour","hue",col,na.translate = FALSE) +
ggplot2::discrete_scale("colour", palette = col,na.translate = FALSE) +
ggplot2::ggtitle(main)
},
in_scatter = {
Expand All @@ -807,8 +808,8 @@ autoplot.tscomparison <- function(object, xlab = NULL, ylab = NULL,
xlab = xlab, ylab = ylab, ...) +
ggplot2::labs(linetype=type_label) +
ggplot2::labs(colour=type_label) +
ggplot2::discrete_scale("colour","hue",col,na.translate = FALSE) +
ggplot2::discrete_scale("linetype", "linetype_d", lty,na.translate = FALSE) +
ggplot2::discrete_scale("colour", palette = col,na.translate = FALSE) +
ggplot2::discrete_scale("linetype", palette = lty,na.translate = FALSE) +
ggplot2::ggtitle(main)
)
}
4 changes: 0 additions & 4 deletions cran-comments.md

This file was deleted.

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.
2 changes: 2 additions & 0 deletions tests/testthat/_snaps/plot/gg-benchmark-lab-bar-gt44.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/testthat/_snaps/plot/gg-benchmark-lab-bar-lt43.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/testthat/_snaps/plot/gg-benchmark-lab-foo-bar-gt44.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions tests/testthat/_snaps/plot/gg-benchmark-lab-foo-bar-lt43.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion tests/testthat/_snaps/plot/gg-benchmark-lab-foo-gt44.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion tests/testthat/_snaps/plot/gg-benchmark-lab-foo-lt43.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion tests/testthat/_snaps/plot/gg-benchmark-nowin-gt44.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 3 additions & 1 deletion tests/testthat/_snaps/plot/gg-benchmark-nowin-lt43.svg
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.
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.
Loading

0 comments on commit 5e7bc0a

Please sign in to comment.