plot_arrange | R Documentation |
Merge multiple curves into a single graph
plot_arrange(
plots,
point = "mean",
theme = theme_classic(),
legend.title = NULL,
legend.position = "top",
trat = NA,
gray = FALSE,
ylab = "Dependent",
xlab = "Independent",
widthbar = 0,
pointsize = 4.5,
linesize = 0.8,
textsize = 12,
legendsize = 12,
legendtitlesize = 12,
fontfamily = "sans"
)
plots |
list with objects of type analysis. |
point |
defines whether you want to plot all points ("all") or only the mean ("mean") |
theme |
ggplot2 theme (default is theme_classic()) |
legend.title |
caption title |
legend.position |
legend position (default is c(0.3,0.8)) |
trat |
name of the curves |
gray |
gray scale (default is FALSE) |
ylab |
Variable response name (Accepts the expression() function) |
xlab |
treatments name (Accepts the expression() function) |
widthbar |
bar width (default is 0.3) |
pointsize |
shape size |
linesize |
line size |
textsize |
Font size |
legendsize |
Legend size text |
legendtitlesize |
Title legend size |
fontfamily |
font family |
The function returns a graph joining the outputs of the functions LM_model, LL_model, BC_model, CD_model, loess_model, normal_model, piecewise_model and N_model
Gabriel Danilo Shimizu
library(AgroReg)
library(ggplot2)
data("aristolochia")
attach(aristolochia)
a=LM(trat,resp)
b=LL(trat,resp,npar = "LL.3")
plot_arrange(list(a,b))
models <- c("LM1", "LL3")
r <- lapply(models, function(x) {
r <- with(granada, regression(time, WL, model = x))
})
plot_arrange(r,trat=models,ylab="WL (%)",xlab="Time (Minutes)")
models = c("asymptotic_neg", "biexponential", "LL4", "BC4", "CD5", "linear.linear",
"linear.plateau", "quadratic.plateau", "mitscherlich", "MM2")
m = lapply(models, function(x) {
m = with(granada, regression(time, WL, model = x))})
plot_arrange(m, trat = paste("(",models,")"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.