plot.mov_cor_dm: Plot method for moving dendrometer-climate correlation

View source: R/plot_mov.cor.R

plot.mov_cor_dmR Documentation

Plot method for moving dendrometer-climate correlation

Description

S3 plotting method for output of mov.cor.dm(). Supports heatmaps, line plots, faceted line plots, peak-correlation summaries, and comparison across multiple mov.cor.dm() objects.

Usage

## S3 method for class 'mov_cor_dm'
plot(
  x,
  y = NULL,
  sig.only = TRUE,
  ci = 0.95,
  clim_vars = "all",
  type = c("heatmap", "line", "facet", "peak", "compare"),
  x_axis = c("time", "doy"),
  use_adjusted = TRUE,
  show_na = TRUE,
  show_ci = FALSE,
  sig_mode = c("outline", "point", "filter", "none"),
  annotate_peak = FALSE,
  show_window_label = TRUE,
  compare_with = NULL,
  compare_labels = NULL,
  low_col = "red",
  mid_col = "white",
  high_col = "blue",
  na_col = "grey79",
  line_size = 0.5,
  point_size = 1.8,
  alpha_sig = 0.9,
  ...
)

Arguments

x

Object returned by mov.cor.dm().

y

Unused.

sig.only

Logical. If TRUE, only significant windows are shown in heatmaps and significance is highlighted in other plot types.

ci

Numeric confidence level between 0 and 1. For non-bootstrap results, significance is based on p_val < 1 - ci or p_adj < 1 - ci. For bootstrap results, the stored logical significance column is used.

clim_vars

Character vector of climate variables to plot, or "all" for all variables.

type

Plot type. One of "heatmap", "line", "facet", "peak", or "compare".

x_axis

X-axis style. One of "time" or "doy".

use_adjusted

Logical. For non-bootstrap objects, if TRUE, significance uses p_adj; otherwise p_val.

show_na

Logical. If TRUE, missing values are shown in heatmaps.

show_ci

Logical. If TRUE, bootstrap confidence intervals are shown in line/facet/compare plots when available.

sig_mode

One of "outline", "point", "filter", or "none" describing how significance is displayed in non-heatmap plots.

annotate_peak

Logical. If TRUE, the strongest absolute correlation is marked for each climate variable in line/facet/compare plots.

show_window_label

Logical. If TRUE, type = "peak" adds the climate transformation settings above each bar.

compare_with

Optional list of additional mov_cor_dm objects for comparison. Used only when type = "compare".

compare_labels

Optional character vector of labels for the comparison objects. If NULL, defaults are generated automatically.

low_col

Colour for negative correlations.

mid_col

Colour for zero correlations.

high_col

Colour for positive correlations.

na_col

Fill colour for missing values in heatmaps.

line_size

Numeric line width for line plots.

point_size

Numeric point size for significance markers and peak markers.

alpha_sig

Numeric transparency used for significance highlighting.

...

Unused.

Value

A ggplot2 object, returned invisibly.


dendRoAnalyst documentation built on May 20, 2026, 5:07 p.m.