Produce profile or longitudinal plots of the data from a Lemna Tec
Scananalyzer using ggplot
. A line is drawn for the data for
each Snapshot.ID.Tag
and the plot can be facetted so that a
grid of plots is produced.
longiPlot(data, x = "xDays+44.5", response = "Area", individuals="Snapshot.ID.Tag",
x.title = "Days", y.title = "Area (1000 pixels)", title = NULL,
facet.x = "Treatment.1", facet.y = "Smarthouse", labeller = NULL,
colour = "black", colour.column=NULL, colour.values=NULL,
alpha = 0.1, ggplotFuncs = NULL, printPlot = TRUE)
An object of class "ggplot
", which can be plotted using
print
.
A data.frame
containing the data to be plotted.
A character
giving the variable to be plotted on the x-axis.
A character
specifying the response variable that
is to be plotted on the y-axis.
A character
giving the name(s) of the
factor
(s) that define the subsets of the
data
for which each subset corresponds to the
response
values for an individual.
Title for the x-axis.
Title for the y-axis.
Title for the plot.
A data.frame
giving the variable to be used to
form subsets to be plotted in separate columns of plots.
Use "."
if a split into columns is not wanted.
A data.frame
giving the variable to be used to
form subsets to be plotted in separate rows of plots.
Use "."
if a split into columns is not wanted.
A ggplot
function
for labelling the
facets of a plot produced using the ggplot
function.
For more information see ggplot
.
A character
specifying a single colour to use in
drawing the lines for the profiles. If colouring according to the
values of a variable is required then use colour.column
.
A character
giving the name of a column
in data
over whose values the colours of the lines are to be
varied. The colours can be specified using colour.values
.
A character
vector specifying the values of
the colours to use in drawing the lines for the profiles.
If this is a named vector, then the values will be matched based
on the names. If unnamed, values will be matched in order
(usually alphabetical) with the limits of the scale.
A numeric
specifying the degrees of transparency to
be used in plotting. It is a ratio in which the denominator
specifies the number of points (or line) that must be overplotted
to give a solid cover.
A list
, each element of which contains the
results of evaluating a ggplot
function.
It is created by calling the list
function with
a ggplot
function call for each element.
A logical
indicating whether or not to print the
plot.
Chris Brien
ggplot
, labeller
.
data(exampleData)
longiPlot(data = longi.dat, response = "Area.smooth")
plt <- longiPlot(data = longi.dat, response = "Area.smooth", x.title = "DAP",
y.title = "Area.smooth", x="xDays+35.42857143", printPlot=FALSE)
plt <- plt + ggplot2::geom_vline(xintercept=29, linetype="longdash", size=1) +
ggplot2::scale_x_continuous(breaks=seq(28, 42, by=2)) +
ggplot2::scale_y_continuous(limits=c(0,750))
print(plt)
longiPlot(data = longi.dat, response = "Area.smooth", x.title = "DAP",
y.title = "Area.smooth", x="xDays+35.42857143",
ggplotFuncs = list(ggplot2::geom_vline(xintercept=29, linetype="longdash",
size=1),
ggplot2::scale_x_continuous(breaks=seq(28, 42, by=2)),
ggplot2::scale_y_continuous(limits=c(0,750))))
Run the code above in your browser using DataLab