Producing Time Profile plots
Usage
plotTimeProfile(
data = NULL,
metaData = NULL,
dataMapping = NULL,
observedData = NULL,
observedDataMapping = NULL,
plotConfiguration = NULL,
plotObject = NULL
)
Arguments
- data
A data.frame to use for plot.
- metaData
A named list of information about
data
such as thedimension
andunit
of its variables.- dataMapping
A
TimeProfileDataMapping
object mappingx
,y
,ymin
,ymax
and aesthetic groups to their variable names ofdata
.- observedData
A data.frame to use for plot. Unlike
data
, meant for simulated data, plotted as lines and ribbons;observedData
is plotted as scatter points and errorbars.- observedDataMapping
An
ObservedDataMapping
object mappingx
,y
,ymin
,ymax
and aesthetic groups to their variable names ofobservedData
.- plotConfiguration
An optional
TimeProfilePlotConfiguration
object defining labels, grid, background and watermark.- plotObject
An optional
ggplot
object on which to add the plot layer
See also
Other molecule plots:
plotBoxWhisker()
,
plotCumulativeTimeProfile()
,
plotDDIRatio()
,
plotGrid()
,
plotHistogram()
,
plotObsVsPred()
,
plotObservedTimeProfile()
,
plotPKRatio()
,
plotPieChart()
,
plotQQ()
,
plotResVsPred()
,
plotResVsTime()
,
plotSimulatedTimeProfile()
,
plotTornado()
Examples
# Produce a Time profile plot with observed and simulated data
obsData <- data.frame(x = c(1, 2, 1, 2, 3), y = c(5, 0.2, 2, 3, 4))
simTime <- seq(1, 10, 0.1)
simData <- data.frame(
x = simTime,
y = 10 * exp(-simTime),
ymin = 8 * exp(-simTime),
ymax = 12 * exp(-simTime)
)
plotTimeProfile(
data = simData,
observedData = obsData,
dataMapping = TimeProfileDataMapping$new(x = "x", y = "y", ymin = "ymin", ymax = "ymax"),
observedDataMapping = ObservedDataMapping$new(x = "x", y = "y")
)