% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/char_plot_results.R
\name{char_plot}
\alias{char_plot}
\alias{char_plot_raw}
\alias{char_plot_thresh_diag}
\alias{char_plot_peaks}
\alias{char_plot_sni}
\alias{char_plot_cumulative}
\alias{char_plot_fri}
\alias{char_plot_fire_history}
\alias{char_plot_zones}
\alias{char_plot_all}
\title{CharAnalysis output figures}
\usage{
char_plot_peaks(out)

char_plot_fire_history(out)

char_plot_cumulative(out)

char_plot_fri(out)

char_plot_zones(out)

char_plot_raw(out)

char_plot_thresh_diag(out)

char_plot_sni(out)

char_plot_all(out, save = FALSE, out_dir = NULL, width = 11, height = 8.5)
}
\arguments{
\item{out}{Named list returned by [CharAnalysis()].  Must contain
\code{charcoal}, \code{pretreatment}, \code{peak_analysis},
\code{char_thresh}, \code{post}, and \code{site}.}

\item{save}{Logical.  If \code{TRUE}, each figure is saved as a PDF in
\code{out_dir}.  Default \code{FALSE}.}

\item{out_dir}{Directory for saved PDFs.  Required when \code{save = TRUE};
no default.  Use \code{tempdir()} for a transient location, or supply
a path of your choosing.  Ignored when \code{save = FALSE}.}

\item{width, height}{PDF dimensions in inches.  Defaults: 11 x 8.5.}
}
\value{
Individual figure functions each return a \pkg{patchwork} / \pkg{ggplot2}
  object.  \code{char_plot_all()} returns a named list of all figure objects.
}
\description{
Nine output figures mirroring the MATLAB CharAnalysis v2.0 plots.
Function names follow R snake_case conventions.
}
\details{
\describe{
  \item{[char_plot_raw()]}{Figure 1 (allFigures only):
    C_raw, C_interpolated, and C_background smoothing options.}
  \item{[char_plot_thresh_diag()]}{Figure 2 (allFigures only):
    Local threshold determination diagnostics (5x5 window grid).}
  \item{[char_plot_peaks()]}{Figure 3: Resampled CHAR with
    background trend (top) and C_peak with thresholds and peak markers (bottom).}
  \item{[char_plot_sni()]}{Figure 4: Sensitivity to alternative
    thresholds and signal-to-noise index.}
  \item{[char_plot_cumulative()]}{Figure 5: Cumulative peaks through time.}
  \item{[char_plot_fri()]}{Figure 6: FRI distributions by
    zone with Weibull model fits.}
  \item{[char_plot_fire_history()]}{Figure 7: Peak magnitude (top),
    FRIs through time with smoothed FRI and CI ribbon (middle), and smoothed
    fire frequency (bottom).}
  \item{[char_plot_zones()]}{Figure 8: Between-zone comparisons
    of raw CHAR distributions (CDF and box plots).}
  \item{[char_plot_all()]}{Convenience wrapper: produces all figures and
    optionally saves them as PDF files.}
}


  Requires the \pkg{ggplot2} package.  Multi-panel layout uses
  \pkg{patchwork} if available; otherwise panels are printed separately
  with a message.
}
\examples{
\donttest{
  # Run pipeline on the bundled example dataset, then plot:
  params_file <- system.file("validation", "CO_charParams.csv",
                             package = "CharAnalysis")
  out <- CharAnalysis(params_file)
  char_plot_peaks(out)
  char_plot_fire_history(out)
  # Individual figures can also be called directly:
  char_plot_sni(out)
  char_plot_fri(out)
  # Save all figures to PDF in a temporary directory:
  char_plot_all(out, save = TRUE, out_dir = tempdir())
}
}
\seealso{
[CharAnalysis()], [char_post_process()]
}
