Skip to contents

Create several plots for an object of class metAgri

Usage

# S3 method for metAgri
plot(
  x,
  type = c("correlation", "covariance", "multi_traits"),
  filter_traits = NULL,
  text_size = 4,
  ...
)

Arguments

x

An object inheriting from class metAgri resulting of executing the function met_analysis()

type

A character string specifying the type of plot. "correlation", "covariance" or "multi_traits"

filter_traits

An optional character vector to filter traits.

text_size

Numeric input to define the text size.

...

Further graphical parameters passed to covcor_heat().

Value

A ggplot object.

Author

Johan Aparicio [aut]

Examples

if (FALSE) {
library(agridat)
library(agriutilities)
data(besag.met)
dat <- besag.met
results <- check_design_met(
  data = dat,
  genotype = "gen",
  trial = "county",
  traits = c("yield"),
  rep = "rep",
  block = "block",
  col = "col",
  row = "row"
)
out <- single_trial_analysis(results, progress = FALSE)
met_results <- met_analysis(out, progress = FALSE)
print(met_results)
plot(met_results, type = "correlation")
plot(met_results, type = "covariance")
}