From 6e5d44ac3daef7b28d6f50dd05b2aac21a81d1d0 Mon Sep 17 00:00:00 2001 From: Philip Bulsink Date: Mon, 20 Apr 2026 08:13:25 -0400 Subject: [PATCH 1/3] Updating for new ggplot2 functions --- DESCRIPTION | 2 +- R/manipulations.R | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index d0a9b0d..9a5af45 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -25,7 +25,7 @@ Depends: Suggests: testthat (>= 3.0.0), withr, - ggplot2 (>= 3.0.0), + ggplot2 (>= 3.5.0), gghighlight, ggthemes, knitr, diff --git a/R/manipulations.R b/R/manipulations.R index 31f3064..aaccd80 100644 --- a/R/manipulations.R +++ b/R/manipulations.R @@ -254,7 +254,7 @@ compress_low_energy <- function( } p <- ftir_spectra_plot + - ggplot2::coord_trans( + ggplot2::coord_transform( x = compress_trans(intercept = cutoff, ratio = compression_ratio) ) From 0dfffc6c3a5075b93e69761e22571422038a9e3f Mon Sep 17 00:00:00 2001 From: Philip Bulsink Date: Mon, 20 Apr 2026 08:16:00 -0400 Subject: [PATCH 2/3] Updated NEWS --- NEWS.md | 1 + 1 file changed, 1 insertion(+) diff --git a/NEWS.md b/NEWS.md index 93ec134..c8f8858 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # PlotFTIR (development version) * `print()` now provides pretty printing for PlotFTIR data structures, showing spectral range, resolution, intensity type, number of samples, and sample IDs. (#27) +* Updated to use `ggplot2::coord_transform()` instead of `coord_trans`, which is now deprecated. (#25) # PlotFTIR 1.2.1 From ea3458e20c9f2bd97ff9a298c11adc22dcd5c0c7 Mon Sep 17 00:00:00 2001 From: Philip Bulsink Date: Mon, 20 Apr 2026 08:16:00 -0400 Subject: [PATCH 3/3] Fixed Docs --- NEWS.md | 1 + man/add_band.Rd | 12 ++++++++++-- man/add_wavenumber_marker.Rd | 12 ++++++++++-- man/dot-pkg_abort.Rd | 36 ------------------------------------ man/dot-shared-params.Rd | 12 ++++++++++-- 5 files changed, 31 insertions(+), 42 deletions(-) delete mode 100644 man/dot-pkg_abort.Rd diff --git a/NEWS.md b/NEWS.md index 93ec134..c8f8858 100644 --- a/NEWS.md +++ b/NEWS.md @@ -1,6 +1,7 @@ # PlotFTIR (development version) * `print()` now provides pretty printing for PlotFTIR data structures, showing spectral range, resolution, intensity type, number of samples, and sample IDs. (#27) +* Updated to use `ggplot2::coord_transform()` instead of `coord_trans`, which is now deprecated. (#25) # PlotFTIR 1.2.1 diff --git a/man/add_band.Rd b/man/add_band.Rd index 5544710..13ebd0a 100644 --- a/man/add_band.Rd +++ b/man/add_band.Rd @@ -34,8 +34,16 @@ Une couleur pour la bande ombrée. Notez que la valeur alpha est fixée à 0,5. Une bande bleue sera ajoutée par défaut si aucune valeur n'est fournie. Voir \verb{vignette(« ggplot2-specs », « ggplot2 »)} pour plus d'informations sur l'esthétique dans les graphiques.} -\item{label_aesthetics}{Named list of aesthetics to pass to ggplot for the label. -Liste nommée d'esthétiques à transmettre à ggplot pour l'étiquette.} +\item{label_aesthetics}{A named `list` of aesthetics to pass to ggplot for + creating the label. See `[ggplot2::geom_text()]`'s aesthetics section for + more info. Specifically, `alpha`, `colo(u)r`, `family`, `fill`, `fontface` and + `size`are permitted. Positioning aesthetics will be removed. + + Une `list` nommée d'esthétiques à transmettre à ggplot pour créer + l'étiquette. Voir la section esthétique de `[ggplot2::geom_text()]` pour + plus d'informations. Plus précisément, `alpha`, `colo(u)r`, `family`, `fill`, + `fontface` et `size` sont autorisés. Les aspects esthétiques du + positionnement seront supprimés.} } \value{ the FTIR plot as a ggplot2 object, with the shaded band added. diff --git a/man/add_wavenumber_marker.Rd b/man/add_wavenumber_marker.Rd index c969b99..3d94305 100644 --- a/man/add_wavenumber_marker.Rd +++ b/man/add_wavenumber_marker.Rd @@ -39,8 +39,16 @@ d'informations. Plus précisément, \code{alpha}, \verb{colo(u)r}, \code{linetyp `linewidth`` sont autorisés. Les aspects esthétiques du positionnement seront supprimés.} -\item{label_aesthetics}{Named list of aesthetics to pass to ggplot for the label. -Liste nommée d'esthétiques à transmettre à ggplot pour l'étiquette.} +\item{label_aesthetics}{A named `list` of aesthetics to pass to ggplot for + creating the label. See `[ggplot2::geom_text()]`'s aesthetics section for + more info. Specifically, `alpha`, `colo(u)r`, `family`, `fill`, `fontface` and + `size`are permitted. Positioning aesthetics will be removed. + + Une `list` nommée d'esthétiques à transmettre à ggplot pour créer + l'étiquette. Voir la section esthétique de `[ggplot2::geom_text()]` pour + plus d'informations. Plus précisément, `alpha`, `colo(u)r`, `family`, `fill`, + `fontface` et `size` sont autorisés. Les aspects esthétiques du + positionnement seront supprimés.} } \value{ the FTIR plot as a ggplot2 object, with a marker added at the diff --git a/man/dot-pkg_abort.Rd b/man/dot-pkg_abort.Rd deleted file mode 100644 index 263f8ad..0000000 --- a/man/dot-pkg_abort.Rd +++ /dev/null @@ -1,36 +0,0 @@ -% Generated by roxygen2: do not edit by hand -% Please edit documentation in R/aaa-conditions.R -\name{.pkg_abort} -\alias{.pkg_abort} -\title{Raise a package-scoped error} -\usage{ -.pkg_abort( - message, - subclass, - call = rlang::caller_env(), - message_env = rlang::caller_env(), - ... -) -} -\arguments{ -\item{message}{(\code{character}) The message for the new error. Messages will be -formatted with \code{\link[cli:cli_bullets]{cli::cli_bullets()}}.} - -\item{subclass}{(\code{character}) Class(es) to assign to the error. Will be -prefixed by "\{package\}-error-".} - -\item{call}{(`environment`) The caller environment for error messages.} - -\item{message_env}{(\code{environment}) The execution environment to use to -evaluate variables in error messages.} - -\item{...}{Additional parameters passed to \code{\link[cli:cli_abort]{cli::cli_abort()}} and on to -\code{\link[rlang:abort]{rlang::abort()}}.} -} -\value{ -Does not return. -} -\description{ -Raise a package-scoped error -} -\keyword{internal} diff --git a/man/dot-shared-params.Rd b/man/dot-shared-params.Rd index 111fab6..4cb9e57 100644 --- a/man/dot-shared-params.Rd +++ b/man/dot-shared-params.Rd @@ -20,8 +20,16 @@ Un tracé généré par [plot_ftir()] ou [plot_ftir_stacked()].} Argument optionnel pour la langue : `fr`/`french`/`francais`/`français` pour le français ; `en`/`english`/`anglais` pour l'anglais ; `NA` utilise la valeur par défaut.} -\item{label_aesthetics}{Named list of aesthetics to pass to ggplot for the label. -Liste nommée d'esthétiques à transmettre à ggplot pour l'étiquette.} +\item{label_aesthetics}{A named `list` of aesthetics to pass to ggplot for + creating the label. See `[ggplot2::geom_text()]`'s aesthetics section for + more info. Specifically, `alpha`, `colo(u)r`, `family`, `fill`, `fontface` and + `size`are permitted. Positioning aesthetics will be removed. + + Une `list` nommée d'esthétiques à transmettre à ggplot pour créer + l'étiquette. Voir la section esthétique de `[ggplot2::geom_text()]` pour + plus d'informations. Plus précisément, `alpha`, `colo(u)r`, `family`, `fill`, + `fontface` et `size` sont autorisés. Les aspects esthétiques du + positionnement seront supprimés.} \item{plot_title}{Title for plot. Defaults to "FTIR Spectra". Vector length 2 uses second element as subtitle.