Skip to contents

Create a concentration-time profile plot

Usage

sensitivityTimeProfiles(
  sensitivityCalculation,
  outputPaths = NULL,
  parameterPaths = NULL,
  xAxisLog = FALSE,
  yAxisLog = TRUE,
  palette = "Cold",
  savePlots = FALSE,
  outputFolder = "",
  width = 16,
  height = 9,
  dpi = 300
)

Arguments

sensitivityCalculation

The SensitivityCalculation object returned by sensitivityCalculation().

outputPaths

Path (or a vector of paths) to the output(s) for which the sensitivity will be analyzed.

parameterPaths

A single or a vector of the parameter path(s) to be varied.

xAxisLog, yAxisLog

Logical that decides whether to display the axis on logarithmic scale.

palette

The name of the palette to be used. Run hcl_palettes(type = "qualitative") for available options.

savePlots

Logical that decides whether you wish to save created plot(s). They are not saved by default. Note that if there are multiple output paths in your model, there will be multiple plots that will be saved.

outputFolder

A character string describing path folder where plots need to be saved. The path must be relative to the current working directory. By default (""), the plots will be saved in the current working directory (which can be found using getwd() function). This parameter is relevant only if savePlots is set to TRUE.

width, height

Plot size in inches. If not supplied, uses the size of current graphics device.

dpi

Plot resolution. Also accepts a string input: "retina" (320), "print" (300), or "screen" (72). Applies only to raster output types.

Value

A single ggplot object if a single output path is specified.

A list of ggplot objects if multiple output paths are specified.

See also

Other sensitivity-calculation: sensitivityCalculation(), sensitivitySpiderPlot()

Examples

if (FALSE) {
simPath <- system.file("extdata", "Aciclovir.pkml", package = "ospsuite")
simulation <- loadSimulation(simPath)
outputPaths <- "Organism|PeripheralVenousBlood|Aciclovir|Plasma (Peripheral Venous Blood)"
parameterPaths <- c(
  "Aciclovir|Lipophilicity",
  "Applications|IV 250mg 10min|Application_1|ProtocolSchemaItem|Dose",
  "Neighborhoods|Kidney_pls_Kidney_ur|Aciclovir|Glomerular Filtration-GFR|GFR fraction"
)

# extract the results into a list of dataframes
results <- sensitivityCalculation(
  simulation = simulation,
  outputPaths = outputPaths,
  parameterPaths = parameterPaths
)

# print plots
sensitivityTimeProfiles(results)

# print and save plots
if (FALSE) {
  sensitivityTimeProfiles(
    results,
    savePlots = TRUE,
    height = 6,
    width = 12
  )
}
}