diff --git a/DESCRIPTION b/DESCRIPTION index 91311cb..32ebe4c 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -22,13 +22,13 @@ Imports: metafor, ggplot2, ggdist, - ggh4x, ggtext, ggbeeswarm, glue, Rdpack, stringr, - mathjaxr + mathjaxr, + legendry (>= 0.2) RoxygenNote: 7.3.2 Roxygen: list(markdown = TRUE) RdMacros: Rdpack, mathjaxr diff --git a/R/jamovimdiff2x2.b.R b/R/jamovimdiff2x2.b.R index c00fccb..26bfccf 100644 --- a/R/jamovimdiff2x2.b.R +++ b/R/jamovimdiff2x2.b.R @@ -321,8 +321,7 @@ jamovimdiff2x2Class <- if (requireNamespace('jmvcore', quietly=TRUE)) R6::R6Clas myplot$scales$scales[[2]]$labels <- mylabs - myplot <- myplot + ggplot2::guides(x = ggh4x::guide_axis_nested(delim = " - ")) - + myplot <- myplot + guides(x = legendry::guide_axis_nested(key = " - ")) print(myplot) TRUE diff --git a/R/plot_meta.R b/R/plot_meta.R index fc98a0b..c16ae13 100644 --- a/R/plot_meta.R +++ b/R/plot_meta.R @@ -588,9 +588,11 @@ esci_plot_difference_axis_x <- function( # Just plot a truncated axis myplot <- myplot + ggplot2::guides( - x.sec = ggh4x::guide_axis_truncated( - trunc_lower = new_lower + reference_value, - trunc_upper = new_upper + reference_value + x.sec = legendry::guide_axis_base( + cap = as.vector(rbind( + new_lower + reference_value, + new_upper + reference_value + )) ) )