Plot heat maps with genotype ranking in two ways.
# 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,
...
)
The object returned by the function wsmp
.
The variable to plot. Defaults to var = 1
the first
variable of x
.
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 (or not) the plot. Default is FALSE
.
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'
.
The name of the file for exportation, default is
NULL
, i.e. the files are automatically named.
The width 'inch' of the plot. Default is 8
.
The height 'inch' of the plot. Default is 7
.
The label size of the plot. It is suggested attribute 1
Numeric vector of length 2 containing the margins for column
and row names, respectively. Default is c(5, 4)
.
The label of y axis. Default is 'Genotypes'.
The label of x axis. Default is 'Number of axes'.
The label of color key. Default is 'Genotype ranking'.
Valid parameter if file.type = 'tiff'
. Define the
resolution of the plot. Default is '300'.
Currently not used.
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.
# 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