plot_abs: Plotting Absolute Data Of Normalized Rootdetection Data Set

View source: R/plotting.R

plot_absR Documentation

Plotting Absolute Data Of Normalized Rootdetection Data Set

Description

Absolute data are plotted as box plot, box and jitter plot combination or violin plot. Signifcances can be illustrated by letter encoding. There are a lot of possibilities to adjust the visualization.

Usage

plot_abs(
  root_norm,
  label_delim = ";",
  type = "jitter",
  size_jitter_dot = 2,
  plot_n = T,
  plot_colours,
  plot_title,
  size_plot_title = 14,
  y_label = "hypocotyl length [mm]",
  x_label = "",
  legend_label = "condition",
  size_legend_title = 12,
  size_legend_text = 10,
  width_lines = 0.5,
  width_axis = 0.5,
  size_x_axes = 9,
  size_y_axes = 9,
  size_n = 3,
  plot_significance = F,
  height_letter = 2,
  size_letter = 5,
  angle_letter = 0,
  plot_response = F,
  width_response = 0.4,
  alpha_response = 0.6
)

Arguments

root_norm

data.frame; normalized Rootdetection data set

label_delim

character; define how Factor1 and Factor2 are separated in Label

type

string; "box" = box plot, 'jitter' = box and jitter plot, 'violin' = violin plot

size_jitter_dot

number; defines the size of the dots in jitter plots

plot_n

logical; if TRUE sample size (n) will be plotted

plot_colours

vector; provide colors for the plot (same length than grouping variable)

plot_title

string; sets a plot title

size_plot_title

numeric; defines size of the plot title

y_label

string; axes description of y-axes

x_label

string; axes description of x-axes

legend_label

string; title of legend

size_legend_title

numeric; defines size of legend title

size_legend_text

numeric; defines size of legend text

width_lines

numeric; defines the line width of boxes or violins

width_axis

numeric; defines the line width of the axis

size_x_axes

numeric; defines size of x-axes labels

size_y_axes

numeric; defines size of y-axes labels

size_n

= numeric; defines size of n plotted (if plot_n = TRUE)

plot_significance

logical; if TRUE significance will be drawn as letters

height_letter

numeric; defines the position of the significance letters

size_letter

numeric; defines size of the significance letters

angle_letter

numeric, defines angle of significance letters

plot_response

logical; if TRUE response will be represented by a line between boxes

width_response

numeric; defines width of response lines

alpha_response

numeric; defines alpha level (visibility) of response lines

Value

plot; box, box jitter or violin plot of the absolute data

Examples

# plot without significance letters

root_norm <- norm_10mm_standard(root_output)
# box plot
plot_abs(root_norm, type = "box")
# box and jitter plot
plot_abs(root_norm, type = "jitter")
# violin plot
plot_abs(root_norm, type = "violin")
# provide own colours (standard r colours or hex-code)
# must have the same length than grouping variable 2 level(root_test_norm$Factor2)
plot_abs(root_norm, plot_colours = c("dodgerblue3", "firebrick2"))

# plot with significance letters

root_norm <- norm_10mm_standard(root_output)
plot_abs(root_norm, plot_significance = TRUE)

# all customizable plotting parameters have a default value
plot_abs(root_norm,
  label_delim = ";",
  type = "jitter", size_jitter_dot = 2,
  plot_n = TRUE,
  plot_colours = c("cornflowerblue", "coral2"),
  plot_title = "My Plot", size_plot_title = 14,
  y_label = "length mm", x_label = "",
  legend_label = "condition", size_legend_title = 12, size_legend_text = 10,
  width_lines = 0.5, width_axis = 0.5,
  size_x_axes = 9, size_y_axes = 9,
  size_n = 3,
  plot_significance = TRUE, height_letter = 5, size_letter = 5, angle_letter = 0,
  plot_response = TRUE, width_response = 0.4, alpha_response = 0.6
)

PhilippJanitza/rootdetectR documentation built on Feb. 24, 2024, 6:46 a.m.