plot_p_vals: Plot p values functions

View source: R/under_construction.R

plot_p_valsR Documentation

Plot p values functions

Description

Plot the observed value with envelopes for expected values for summary function

Usage

plot_p_vals(
  func = "K",
  envelopes,
  pattern.colors = c(`Envelope 1` = "pink", `Envelope 2` = "gray", Observed = "blue"),
  envelope_names = c("r", "p"),
  base_value = "first",
  unit = "nm",
  K_cor = "trans",
  G_cor = "km",
  F_cor = "km",
  GXGH_cor = "km",
  GXHG_cor = "km",
  G2_cor = "km",
  legend.key.size = 20,
  legend.text.size = 20,
  legend.position = c(0.75, 0.8),
  axis.title.size = 40,
  title = "",
  title.size = 40,
  axis.text.x.size = 40,
  axis.text.y.size = 40,
  linewidth = 0.5,
  linetype = "solid",
  env_linetype = "dashed"
)

Arguments

func

Summary function to plot.

envelopes

a list envelope values found by function such as calc_summary_funcs. Should be list of length equal to the number of envelopes. The structure should resemble: 'envelopes[[envelope_num]]$rrl_K[, c("r", "mmean")]'

pattern.colors

colors and names for envelope lines. MUST follow some formatting rules. Envelope names must come first. If each observed value corresponds to a different envelope, then the number of 'observed_values' must match 'length(envelopes)' and only the first '1:length(envelopes)' of 'pattern_colors' will be used. and must set 'base_value = "each"'. If not, each envelope and each observed value needs its own color. then the 'mmean' value from 'envelopes[[1]]' will be subtracted from each envelope and observed value.

base_value

a character, either '"first" or "each"'. Does each observed value correspond to a different envelope? If yes, set to '"each"'. Otherwise, set to '"first"' and the envelopes[[1]] will be used for each

unit

a character. This will appear as the units in the x axis label

K_cor

edge correction(s) to be used when 'func = "K"'

G_cor

edge correction(s) to be used when 'func = "G"'

F_cor

edge correction(s) to be used when 'func = "F"'

GXGH_cor

edge correction(s) to be used when 'func = "GXGH"'

GXHG_cor

edge correction(s) to be used when 'func = "GXHG"'

legend.key.size

numeric. size of legend key

legend.text.size

numeric. size of legend text

axis.title.size

numeric. Size of axis title

title

a character. Text for title

title.size

numeric. Title size

axis.text.x.size

numeric. size of text on x axis

axis.text.y.size

numeric. size of text on y axis

linewidth

numeric. Width of lines in plot

linetype

a character. Type of lines that make up lines

legend.position.

vector of 2 numerics. coordinates of legend

Details

The best way to learn about this function is to read the parameter definitions.


rolandrolandroland/rTEM documentation built on March 29, 2025, 2:17 p.m.