Skip to contents

Creates a graphical field array for a set of plot effects (e.g., phenotypes, genetic values, or plot errors). Requires a data frame generated with the functions field_trial_error or make_phenotypes, or any data frame matching the description below.

Usage

plot_effects(df, effect, blocks = TRUE, labels = TRUE)

Arguments

df

A data frame with the columns 'col', 'row', and the effects to be plotted.

effect

The name of the effects to be plotted.

blocks

When TRUE (default), the field array is split into blocks. This requires an additional column 'block' in the data frame.

labels

When TRUE (default), column and row labels are displayed.

Value

A graphical field array with x- and y-axes displaying the column and row numbers, and colour gradient ranging from red (low value) to green (high value).

Examples

# Display the simulated plot errors in the example data frame 'error_df_bivar'
# for Trait 1 in Environment 1.

error_df <- error_df_bivar[error_df_bivar$env == 1, ]

plot_effects(
  df = error_df,
  effect = "e.Trait1",
  labels = TRUE,
)