plot.smaAgri {agriutilities}R Documentation

Plot an object of class smaAgri

Description

Create several plots for an object of class smaAgri

Usage

## S3 method for class 'smaAgri'
plot(
  x,
  type = c("summary", "correlation", "spatial"),
  filter_traits = NULL,
  nudge_y_cv = 3,
  nudge_y_h2 = 0.07,
  horizontal = FALSE,
  theme_size = 15,
  axis_size = 8,
  text_size = 4,
  ...
)

Arguments

x

An object inheriting from class smaAgri resulting of executing the function single_trial_analysis()

type

A character string specifiying the type of plot. "summary", "correlation" or "spatial".

filter_traits

An optional character vector to filter traits.

nudge_y_cv

Vertical adjustment to nudge labels by when plotting CV bars. Only works if the argument type is "summary". 3 by default.

nudge_y_h2

Vertical adjustment to nudge labels by when plotting h2 bars. Only works if the argument type is "summary". 0.07 by default.

horizontal

If FALSE, the default, the labels are plotted vertically. If TRUE, the labels are plotted horizontally.

theme_size

Base font size, given in pts. 15 by default.

axis_size

Numeric input to define the axis size.

text_size

Numeric input to define the text size.

...

Further graphical parameters. For future improvements.

Value

A ggplot object.

Author(s)

Johan Aparicio [aut]

Examples


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)
print(out)
plot(out, type = "summary", horizontal = TRUE)
plot(out, type = "correlation")
plot(out, type = "spatial")


[Package agriutilities version 1.2.0 Index]