R/jaspObjectWrapperMethods.R

Defines functions `+.jaspPlotWrapper`

#' @export
`+.jaspPlotWrapper` <- function(e1, e2) {
  # forward operator `+` to the ggplot method for `+` so people can e.g., change axes labels by doing `jaspPlot + ggplot2::xlab("new title")`
  e1$plotObject <- e1$plotObject + e2
  return(e1)
}
jasp-stats/jaspBase documentation built on April 5, 2025, 3:46 p.m.