Makes a radar plot showing the multi-trait genotype-ideotype distance index
# S3 method for mgidi
plot(
x,
SI = 15,
radar = TRUE,
type = "index",
position = "fill",
rotate = FALSE,
genotypes = "selected",
n.dodge = 1,
check.overlap = FALSE,
x.lab = NULL,
y.lab = NULL,
title = NULL,
size.point = 2.5,
size.line = 0.7,
size.text = 3.5,
width.bar = 0.75,
col.sel = "red",
col.nonsel = "gray",
legend.position = "bottom",
...
)
An object of class gg, ggplot
.
An object of class mgidi
An integer (0-100). The selection intensity in percentage of the total number of genotypes.
Logical argument. If true (default) a radar plot is generated
after using coord_polar()
.
The type of the plot. Defaults to "index"
. Use type = "contribution"
to show the contribution of each factor to the MGIDI
index of the selected genotypes/treatments.
The position adjustment when type = "contribution"
.
Defaults to "fill"
, which shows relative proportions at each trait
by stacking the bars and then standardizing each bar to have the same
height. Use position = "stack"
to plot the MGIDI index for each
genotype/treatment.
Logical argument. If rotate = TRUE
the plot is rotated,
i.e., traits in y axis and value in the x axis.
When type = "contribution"
defines the genotypes to
be shown in the plot. By default (genotypes = "selected"
only
selected genotypes are shown. Use genotypes = "all"
to plot the
contribution for all genotypes.)
The number of rows that should be used to render the x labels. This is useful for displaying labels that would otherwise overlap.
Silently remove overlapping labels, (recursively) prioritizing the first, last, and middle labels.
The labels for the axes x and y, respectively. x label is set to null when a radar plot is produced.
The plot title when type = "contribution"
.
The size of the point in graphic. Defaults to 2.5.
The size of the line in graphic. Defaults to 0.7.
The size for the text in the plot. Defaults to 10.
The width of the bars if type = "contribution"
.
Defaults to 0.75.
The colour for selected genotypes. Defaults to "red"
.
The colour for nonselected genotypes. Defaults to "gray"
.
The position of the legend.
Other arguments to be passed from ggplot2::theme()
.
Tiago Olivoto tiagoolivoto@gmail.com
# \donttest{
library(metan)
model <- gamem(data_g,
gen = GEN,
rep = REP,
resp = c(KW, NR, NKE, NKR))
mgidi_index <- mgidi(model)
plot(mgidi_index)
# }
Run the code above in your browser using DataLab