multiPlotSP {transmem} | R Documentation |
Plots several single-phase transport profiles overlayed
Description
Given a list of several complete transport data, the function overlays the transport profiles in a defined phase. The function is useful in membrane reuse experiments as transport profile deterioration is easily visualized.
Usage
multiPlotSP(trans, phase = "strip", trend = NULL, legend = FALSE,
xlab = "Time (h)", ylab = expression(Phi), xlim = NULL, ylim = NULL,
xbreaks = NULL, ybreaks = NULL, size = 3, plot = TRUE, shape = 15,
bw = FALSE, arw = FALSE, arw.pos = NULL, arw.txt = NULL,
txt.pos = NULL, txt.size = NULL)
Arguments
trans |
List of data frames with the complete transport
information of interest species. Must be generated
using |
phase |
Phase to be represented in the plot: |
trend |
List of Non-linear regression models of the main species
transport profil. Generated using |
legend |
Logical. If |
xlab |
Label to be used for x axis. Text and expression allowed. |
ylab |
Label to be used for y axis. Text and expression allowed. |
xlim |
Numeric vector of limits for X-axis. |
ylim |
Numeric vector of limits for X-axis. |
xbreaks |
Numeric vector of x-axis breaks. |
ybreaks |
Numeric vector of x-axis breaks. |
size |
Size used for points in the plot. |
plot |
Logical. If |
shape |
Shape to use in the points to be plotted. |
bw |
Logical, if |
arw |
Logical default to |
arw.pos |
Numeric vector of the coordinates of the arrow if
|
arw.txt |
Text to be (optionally) printed alongside the arrow. |
txt.pos |
Numeric vector of the position of the center of the text
provided in |
txt.size |
Size of the text accompanying the arrow. |
Details
Most transmem
graphical representations are made using the package
ggplot2
so the function returns a ggplot2 object that can be
assigned to a variable for further modification.
Value
Plot with the overlayed transport profiles for a single phase
Author(s)
Cristhian Paredes, craparedesca@unal.edu.co
Eduardo Rodriguez de San Miguel, erdsmg@unam.mx
Examples
data(reusecycles)
# First step is to get trend lines for each cycle:
trend <- list()
for (i in 1:length(reusecycles)) {
trend[[i]] <- transTrend(trans = reusecycles[[i]])
}
# Default plot using colors:
multiPlotSP(trans = reusecycles, trend = trend, legend = TRUE)
# Black and white plot including an arrow:
multiPlotSP(trans = reusecycles, trend = trend, legend = TRUE, bw = TRUE,
arw = TRUE, arw.pos = c(6.1, 6.1, 0.8, 0.6),
arw.txt = 'Cycle', txt.pos = c(6.15, 0.7))