metan (version 1.2.1)

plot.wsmp: Plot heat maps with genotype ranking

Description

Plot heat maps with genotype ranking in two ways.

Usage

# S3 method for wsmp
plot(
  x,
  var = 1,
  type = 2,
  export = FALSE,
  file.type = "pdf",
  file.name = NULL,
  width = 6,
  height = 5,
  size.lab = 1,
  margins = c(5, 4),
  y.lab = NULL,
  x.lab = NULL,
  key.lab = "Genotype ranking",
  resolution = 300,
  ...
)

Arguments

x

The object returned by the function wsmp.

var

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

type

1 = Heat map Ranks: this graphic shows the genotype ranking considering the WAAS estimated with different numbers of Principal Components; 2 = Heat map WAASY-GY ratio: this graphic shows the genotype ranking considering the different combinations in the WAAS/GY ratio.

export

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

file.type

If export = TRUE define 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.

width

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

height

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

size.lab

The label size of the plot. It is suggested attribute 1

margins

Numeric vector of length 2 containing the margins for column and row names, respectively. Default is c(5, 4).

y.lab

The label of y axis. Default is 'Genotypes'.

x.lab

The label of x axis. Default is 'Number of axes'.

key.lab

The label of color key. Default is 'Genotype ranking'.

resolution

Valid parameter if file.type = 'tiff'. Define the resolution of the plot. Default is '300'.

...

Currently not used.

Details

The first type of heatmap shows the genotype ranking depending on the number of principal component axis used for estimating the WAASB index. An euclidean distance-based dendrogram is used for grouping the genotype ranking for both genotypes and principal component axis. The second type of heatmap shows the genotype ranking depending on the WAASB/GY ratio. The ranks obtained with a ratio of 100/0 considers exclusively the stability for the genotype ranking. On the other hand, a ratio of 0/100 considers exclusively the productivity for the genotype ranking. Four clusters are estimated (1) unproductive and unstable genotypes; (2) productive, but unstable genotypes; (3) stable, but unproductive genotypes; and (4), productive and stable genotypes.

Examples

Run this code
# NOT RUN {
library(metan)
model <- waas(data_ge2, ENV, GEN, REP, PH) %>%
         wsmp()
plot(model)
# }
# NOT RUN {
# }

Run the code above in your browser using DataCamp Workspace