Plot the regression model generated by the function ge_reg
.
# S3 method for ge_reg
plot(
x,
var = 1,
type = 1,
plot_theme = theme_metan(),
x.lim = NULL,
x.breaks = waiver(),
x.lab = NULL,
y.lim = NULL,
y.breaks = waiver(),
y.lab = NULL,
leg.position = "right",
size.tex.lab = 12,
...
)
An object of class ge_factanal
The variable to plot. Defaults to var = 1
the first
variable of x
.
The type of plot to show. type = 1
produces a plot with
the environmental index in the x axis and the genotype mean yield in the y
axis. type = 2
produces a plot with the response variable in the x
axis and the slope/deviations of the regression in the y axis.
The graphical theme of the plot. Default is
plot_theme = theme_metan()
. For more details, see
ggplot2::theme()
.
The range of x-axis. Default is NULL
(maximum and minimum
values of the data set). New arguments can be inserted as x.lim = c(x.min, x.max)
.
The breaks to be plotted in the x-axis. Default is
authomatic breaks
. New arguments can be inserted as x.breaks = c(breaks)
The label of x-axis. Each plot has a default value. New
arguments can be inserted as x.lab = "my label"
.
The range of x-axis. Default is NULL
. The same arguments
than x.lim
can be used.
The breaks to be plotted in the x-axis. Default is
authomatic breaks
. The same arguments than x.breaks
can be
used.
The label of y-axis. Each plot has a default value. New
arguments can be inserted as y.lab = "my label"
.
The position of the legend.
The size of the text in the axes text and labels. Default
is 12
.
Currently not used..
An object of class gg, ggplot
.
# NOT RUN {
library(metan)
model <- ge_reg(data_ge2, ENV, GEN, REP, PH)
plot(model)
# }
# NOT RUN {
# }
Run the code above in your browser using DataLab