plot_waasby: Plot WAASBY values for genotype ranking

View source: R/plot_waasby.R

plot_waasbyR Documentation

Plot WAASBY values for genotype ranking

Description

[Stable]

Plot heat maps with genotype ranking in two ways.

Usage

plot_waasby(
  x,
  var = 1,
  export = F,
  file.type = "pdf",
  file.name = NULL,
  plot_theme = theme_metan(),
  width = 6,
  height = 6,
  size.shape = 3.5,
  size.tex.lab = 12,
  col.shape = c("blue", "red"),
  x.lab = "WAASBY",
  y.lab = "Genotypes",
  x.breaks = waiver(),
  resolution = 300,
  ...
)

Arguments

x

The WAASBY object

var

The variable to plot. Defaults to var = 1 the first variable of x.

export

Export (or not) the plot. Default is T.

file.type

The type of file to be exported. Default is pdf, Graphic can also be exported in *.tiff format by declaring file.type = "tiff".

file.name

The name of the file for exportation, default is NULL, i.e. the files are automatically named.

plot_theme

The graphical theme of the plot. Default is plot_theme = theme_metan(). For more details, see ggplot2::theme().

width

The width "inch" of the plot. Default is 8.

height

The height "inch" of the plot. Default is 7.

size.shape

The size of the shape in the plot. Default is 3.5.

size.tex.lab

The size of the text in axis text and labels.

col.shape

A vector of length 2 that contains the color of shapes for genotypes above and below of the mean, respectively. Default is c("blue", "red").

x.lab

The label of the x axis in the plot. Default is "WAASBY".

y.lab

The label of the y axis in the plot. Default is "Genotypes".

x.breaks

The breaks to be plotted in the x-axis. Default is authomatic breaks. New arguments can be inserted as x.breaks = c(breaks)

resolution

The resolution of the plot. Parameter valid if file.type = "tiff" is used. Default is 300 (300 dpi)

...

Currently not used.

Value

An object of class gg, ggplot.

Author(s)

Tiago Olivoto tiagoolivoto@gmail.com

See Also

plot_scores()

Examples


library(metan)
library(ggplot2)
waasby <- waasb(data_ge,
                resp = GY,
                gen = GEN,
                env = ENV,
                rep = REP)
waasby2 <- waas(data_ge,
                resp = GY,
                gen = GEN,
                env = ENV,
                rep = REP)
plot_waasby(waasby)
plot_waasby(waasby2) +
            theme_gray() +
            theme(legend.position = "bottom",
                  legend.background = element_blank(),
                  legend.title = element_blank(),
                  legend.direction = "horizontal")



metan documentation built on March 7, 2023, 5:34 p.m.