% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/mean.detrended.dm.R
\name{plot.mean_dm_detrended}
\alias{plot.mean_dm_detrended}
\title{Plot mean detrended dendrometer series}
\usage{
\method{plot}{mean_dm_detrended}(
  x,
  y = NULL,
  type = c("series", "seasonal", "boxplot"),
  value = c("both", "STD_DDM", "RES_DDM"),
  seasons = NULL,
  x_axis = c("default", "date", "doy", "season_day"),
  facet_by = c("none", "season", "metric"),
  ncol = NULL,
  box_group = c("metric", "season"),
  alpha = 0.8,
  line_width = 0.8,
  point_size = 1.4,
  legend_position = "right",
  ...
)
}
\arguments{
\item{x}{An object of class \code{"mean_dm_detrended"} returned by
\code{mean_detrended.dm()}.}

\item{y}{Unused.}

\item{type}{Plot type. One of:
\describe{
  \item{`"series"`}{Plot the time series over calendar time, DOY, or season day.}
  \item{`"seasonal"`}{Overlay seasons on a season-day scale.}
  \item{`"boxplot"`}{Show boxplots of the detrended values by season or metric.}
}}

\item{value}{Which variable to plot. One of:
\describe{
  \item{`"both"`}{Plot both \code{STD_DDM} and \code{RES_DDM} when available.}
  \item{`"STD_DDM"`}{Plot only the mean detrended series.}
  \item{`"RES_DDM"`}{Plot only the autocorrelation-removed mean detrended series.}
}}

\item{seasons}{Optional character vector of \code{season_label} values to retain.}

\item{x_axis}{Character string controlling the x-axis. One of:
\describe{
  \item{`"default"`}{Uses calendar date for \code{type = "series"} and
    season day for \code{type = "seasonal"}.}
  \item{`"date"`}{Use actual calendar date.}
  \item{`"doy"`}{Use calendar day-of-year.}
  \item{`"season_day"`}{Use vegetation season day.}
}}

\item{facet_by}{Character string controlling faceting. One of:
\describe{
  \item{`"none"`}{No faceting.}
  \item{`"season"`}{Facet by \code{season_label}.}
  \item{`"metric"`}{Facet by metric (\code{STD_DDM}, \code{RES_DDM}).}
}}

\item{ncol}{Optional integer giving the number of facet columns.}

\item{box_group}{For \code{type = "boxplot"}, grouping variable on the x-axis.
One of \code{"metric"} or \code{"season"}.}

\item{alpha}{Numeric alpha transparency for lines/points.}

\item{line_width}{Numeric line width.}

\item{point_size}{Numeric point size.}

\item{legend_position}{Character legend position passed to ggplot2.}

\item{...}{Further arguments passed to or from other methods.}
}
\value{
A \code{ggplot2} object.
}
\description{
S3 plotting method for objects returned by \code{mean_detrended.dm()}.

It can plot:
\itemize{
  \item the mean detrended series (\code{STD_DDM}),
  \item the autocorrelation-removed mean detrended series (\code{RES_DDM}),
  \item or both together.
}
}
