plot.FW {statgenGxE} | R Documentation |
Plot function for class FW
Description
Four types of plot can be made. A scatter plot for genotypic mean,
square root of mean squared deviation and sensitivity, a line plot with
fitted lines for each genotype, a trellis plot with individual slopes per
genotype and a scatter plot of fitted values in the worst and best trial.
It is possible to select genotypes for the trellis plot using the
genotypes
parameter. If there are more than 64 genotypes, only the
first 64 are plotted in the trellis plot.
Usage
## S3 method for class 'FW'
plot(
x,
...,
plotType = c("scatter", "line", "trellis", "scatterFit"),
order = c("ascending", "descending"),
response = c("predicted", "observed"),
colorGenoBy = NULL,
colGeno = NULL,
genotypes = NULL,
title = paste("Finlay & Wilkinson analysis for", x$trait),
output = TRUE
)
Arguments
x |
An object of class FW. |
... |
Not used. |
plotType |
A character string indicating which plot should be made. Either "scatter", "line" or "trellis" for creating a scatter plot of genotypic means, mse and sensitivities, a plot of fitted lines for each genotype or a trellis plot of the individual genotype slopes respectively. |
order |
A character string specifying whether the results in the line
plot should be ordered in an increasing (or decreasing) order of
sensitivities. Ignored if |
response |
A character string specifying whether in the line plot the
"predicted" or the "observed" data should be plotted. Ignored if
|
colorGenoBy |
A character string indicating a column in the |
colGeno |
A character vector with plot colors for the genotypes. A
single color when |
genotypes |
An optional character string containing the genotypes to
be plotted in the trellis plot. If |
title |
A character string used a title for the plot. |
output |
Should the plot be output to the current device? If
|
Value
A plot depending on plotType
.
See Also
Other Finlay-Wilkinson:
fitted.FW()
,
gxeFw()
,
report.FW()
,
residuals.FW()
Examples
## Run Finlay-Wilkinson analysis.
geFW <- gxeFw(TD = TDMaize, trait = "yld")
## Create a scatter plot.
plot(geFW)
## Create a line plot.
plot(geFW, plotType = "line")
## Create a line plot showing observed data value for genotypes and fitted lines.
## Display trials in descending order.
plot(geFW, plotType = "line", order = "descending", response = "observed")
## Create a trellis plot.
plot(geFW, plotType = "trellis")
## Create a scatter plot of fitted values for the worst and best trials.
plot(geFW, plotType = "scatterFit")