MappedDataTimeProfile
MappedDataTimeProfile.RdR6 class for mapping variable to data for time profile visualizations. This class extends MappedData to provide specialized functionality for time-series plots, including support for secondary y-axes, dual scaling, and time-specific axis handling.
Details
This class is specifically designed for pharmacokinetic time profile plots where data may need to be displayed on dual y-axes with different scales (linear/log). It handles complex scenarios like mapping simulated and observed data with different scaling requirements.
See also
Other MappedData classes:
MappedData,
MappedDataBoxplot,
MappedDataRangeDistribution
Super class
ospsuite.plots::MappedData -> MappedDataTimeProfile
Active bindings
requireDualAxisboolean, If TRUE secondary axis is required
listOfGroupscharacter vector of groupings
secAxissec_axis() object
dataForPlotscaled data used for plotting adjust limits
Methods
Method new()
Create a new MappedDataTimeProfile object
Usage
MappedDataTimeProfile$new(
data,
mapping,
groupAesthetics = NULL,
groupOrder = NULL,
direction = "y",
isObserved = TRUE,
xlimits = NULL,
ylimits = NULL,
xscale = AxisScales$linear,
scaleOfPrimaryAxis = AxisScales$linear,
scaleOfSecondaryAxis = AxisScales$linear,
y2limits = NULL
)Arguments
datadata.frame used for mapping
mappinglist of aesthetic mappings
groupAestheticsvector of aesthetics, which are used for columns mapped with aesthetic
groupby, use of group aesthetics triggers second axis after simulation layersgroupOrderlabels and order for group aesthetic
directiondirection of plot either "x" or "y"
isObservedA
booleanif TRUE mappings mdv, lloq are evaluatedxlimitslimits for x-axis (may be NULL)
ylimitslimits for primary axis (may be NULL)
xscale= scale of x-axis
scaleOfPrimaryAxisscale of direction, either "linear" or "log"
scaleOfSecondaryAxiseither 'linear' or 'log'
y2limitslimits for secondary axis (may be NULL)
Method scaleDataForSecondaryAxis()
Usage
MappedDataTimeProfile$scaleDataForSecondaryAxis(
ylimits = NULL,
y2limits = NULL,
y2scale.args = list()
)Examples
if (FALSE) { # \dontrun{
# Create time profile mapping with secondary axis
timeData <- MappedDataTimeProfile$new(
data = myDataFrame,
mapping = aes(x = time, y = concentration, y2axis = fraction_unbound),
scaleOfPrimaryAxis = "linear",
scaleOfSecondaryAxis = "log"
)
# Time profile with grouping aesthetics
timeData <- MappedDataTimeProfile$new(
data = myDataFrame,
mapping = aes(x = time, y = concentration, color = compound),
groupAesthetics = c("color", "linetype")
)
} # }