Package: ospsuite.plots 1.2.0

Katrin Coboeken

ospsuite.plots: Library for standardized graphs

This library provides a standardized approach to creating graphs and tables in the ospsuite context. It is based on ggplot2.

Authors:Open-Systems-Pharmacology Community [cph], Katrin Coboeken [aut, cre]

ospsuite.plots_1.2.0.tar.gz
ospsuite.plots_1.2.0.zip(r-4.7)ospsuite.plots_1.2.0.zip(r-4.6)ospsuite.plots_1.2.0.zip(r-4.5)
ospsuite.plots_1.2.0.tgz(r-4.6-any)ospsuite.plots_1.2.0.tgz(r-4.5-any)
ospsuite.plots_1.2.0.tar.gz(r-4.7-any)ospsuite.plots_1.2.0.tar.gz(r-4.6-any)
ospsuite.plots_1.2.0.tgz(r-4.6-emscripten)
manual.pdf |manual.html
DESCRIPTION |NEWS
card.svg |card.png
ospsuite.plots/json (API)

# Install 'ospsuite.plots' in R:
install.packages('ospsuite.plots', repos = c('https://open-systems-pharmacology.r-universe.dev', 'https://cloud.r-project.org'))

Bug tracker:https://github.com/open-systems-pharmacology/ospsuite.plots/issues

Pkgdown/docs site:https://www.open-systems-pharmacology.org

Datasets:

On CRAN:

Conda:

6.53 score 4 stars 20 scripts 51 exports 42 dependencies

Last updated from:23c7e6519f (on v1.2.0). Checks:7 NOTE, 2 OK. Indexed: yes.

TargetResultTimeFilesSyslog
linux-devel-x86_64NOTE261
source / vignettesOK398
linux-release-x86_64NOTE250
macos-release-arm64NOTE153
macos-oldrel-arm64NOTE122
windows-develNOTE186
windows-releaseNOTE187
windows-oldrelNOTE162
wasm-releaseOK200

Exports:addLLOQLayeraddWatermarkaddXScaleaddXYScaleaddYScaleAxisScalesBINNINGMODEcolorMapsCombinedPlotconstructLabelWithUnitexportPlotgeom_errorbar_ospgeom_point_ospGeomErrorbarOspGeomPointOspgetDefaultGeomAttributesgetDefaultOptionsgetFoldDistanceListgetOspsuite.plots.optionggplotWithWatermarkinitializePlotMappedDataMappedDataBoxplotMappedDataRangeDistributionMappedDataTimeProfilemetaData2DataFrameOptionKeysospShapeNamesplotBoxWhiskerplotForestplotHistogramplotPredVsObsplotQQplotRangeDistributionplotRatioVsCovplotResVsCovplotTimeProfileplotYVsXresetDefaultColorMapDistinctresetDefaultsresetDefaultThemescale_shape_ospscale_shape_osp_identityscale_shape_osp_manualsetDefaultColorMapDistinctsetDefaultssetDefaultThemesetOspsuite.plots.optionShapesstat_qq_ospupdateScaleArgumentsForTimeUnit

Dependencies:backportscheckmateclicowplotcpp11data.tabledplyrfarverfitdistrplusfsgenericsggh4xggnewscaleggplot2gluegtableisobandlabelinglatticelifecyclemagrittrMASSMatrixospsuite.utilspillarpkgconfigpurrrR6RColorBrewerrlangS7scalesstringistringrsurvivaltibbletidyrtidyselectutf8vctrsviridisLitewithr

Box-Whisker Plots
1. Introduction | 1.1 Setup | 1.2 Example Data | 2. Examples | 2.1 Examples for Aggregation of Categorical Data | 2.1.1 Minimal Example | 2.1.2 Stratification on X-axis | 2.1.3 Stratification by Color | 2.1.4 Stratification by Color and on X-axis | 2.1.5 Stratification by Column Combination | 2.1.6 Omit Data Points Flagged as Missing Dependent Variable (MDV) | 2.2 Examples for Box-Whisker vs Numeric Data | 2.2.1 Numeric Data as Factor | 2.2.2 Numeric Data as Distinct Numeric Values | 2.2.3 Map Continuous Column with Binning | 2.3 Aggregation Function | 2.3.1 Example for Customized Percentiles | 2.3.2 Example for Customized Aggregation Function | 2.3.3 Tables Corresponding to Plot | 2.4 Show Outliers | 2.4.1 Outliers with Default Settings | 2.4.2 Outliers with Customized Settings | 2.4.3 Retrieve Outliers as Table | 3. Plot Configuration of Boxplots

Last update: 2026-05-27
Started: 2025-09-23

Forestplots
1. Introduction | 1.1 Setup | 1.2 Example Data | 2. Generating Forest Plots | 2.1 Basic Example | Explanation: | 2.2 Example Without Table | 2.3 Faceting by Data Type

Last update: 2026-05-27
Started: 2025-09-23

Goodness of fit
1. Introduction | 1.1 Setup | 1.2 Example Data | 1.2.1 Dataset with Predicted and Observed Data | 1.2.2 Dataset for Examples with DDI Prediction | 1.2.3 Dataset for Ratio Comparison | 2. Predicted vs Observed (plotPredVsObs()) | 2.1 Basic Examples | 2.1.1 Default Settings | 2.1.2 Basic Example: Linear Scale | 2.1.3 Error Bars for Observed Data | 2.1.4 Error Bars for Observed and Predicted Data | 2.1.5 Example with LLOQ | 2.2 Adjust Comparison Lines | 2.2.1 Adjust Fold Distance | 2.2.2 Adjust Display of Lines | 2.3 Adding a Regression Line | 2.4 Add Guest Criteria Lines | 2.5 Use Non-Square Format | 3. Residuals vs Covariate (plotResVsCov()) | 3.1 Basic Examples | 3.1.1 Default Settings | 3.1.2 Linear Scale for Residuals | 3.2 Adjusting Comparison Lines | 3.3 Adding a Regression Line | 4. Ratio Plots (plotRatioVsCov()) | 4.1 Basic Examples | 4.1.1 Default Settings | 4.1.2 Compare Residuals as Ratio | 4.1.3 Using {ospsuite.plots} Specific Aesthetics like MDV and error_relative | 4.2 Qualification of Ratios | 4.3 Add Guest Criteria Lines | 5. Quantile Plot (plotQQ()) | 6 Residuals in Other Plot Functions | 6.1 Residuals as Histogram | 6.2 Stratify Residuals with a Box-Whisker Plot

Last update: 2026-05-27
Started: 2025-09-23

Histogram Plots
1. Introduction | 1.1 Setup | 1.2 Example Data | 2. Examples | 2.1 Illustration of Basic Histograms | 2.1.1 Basic Example | 2.1.2 Basic Example: Change of Defaults | 2.1.3 Basic Example: Change of Position but Keep Number of Bins | 2.1.4 Basic Example: Overlay of Histograms | 2.1.5 Omit Data Points Flagged as Missing Dependent Variable (MDV) | 2.1.6 Stratified by a Combination of Columns | 2.1.7 Customization of Binning | 2.2 Frequency | 3. Distribution Fit | 3.1 Fit of a Normal Distribution with Mean as Vertical Line | 3.2 Fit of a Chi-Squared Distribution without Vertical Line | 3.3 Fit of Stacked Data | 3.4 Fit with Frequency TRUE | 3.5 Fit with Frequency TRUE and Stacked Data | 3.6 X-Axis on Log Scale for Distribution Fit | 4. Histogram for Categorical Data

Last update: 2026-05-27
Started: 2025-09-12

Overview
1. Introduction | 1.1 Objectives of ospsuite.plots | 2. Default Settings for Layout | 2.1 Plots with and without Default Layout | 2.1.1 Default ggplot Layout | 2.1.2 Set ospsuite.plots Layout | 2.1.3 Reset to Previously Saved Layout | 2.2 Default Theme | 2.3 Default Color | Reset to Previously Saved Color Map | 2.4 Default Shapes | 2.5 Default Options | 2.5.1 Options to Customize Watermark | Examples to Customize Watermark | 2.5.2 Options to Set the Defaults for Geom Layer Attributes | 2.5.3 Options to Set Defaults for Aesthetics | 2.5.4 Options for Percentiles | 2.5.5 Options to Define Export Format | 3. Plot Functions | 3.1 plotTimeProfile() | 3.2 plotBoxWhisker() | 3.3 plotHistogram() | 3.4 plotPredVsObs() | 3.5 plotResVsCov() | 3.6 plotRatioVsCov() | 3.7 plotQQ() | 4. Additional Aesthetics | 5. Plot Export | 5.1 Basic Usage | 5.2 Advanced Usage | Adjusting Plot Dimensions Based on Content | 6. Shapes | 6.1 Default Shapes | 6.2 Using OSP Shapes in Plot Functions

Last update: 2026-05-27
Started: 2025-09-23

Range Plot Visualization
1. Introduction | 1.1 Setup | 1.2 Example Data | 2. Binning Methods | 3. Continuous vs. Step Function Plot Types | 4. Generating Range Plots | 4.1 Basic Range Plot | Explanation: | 4.2 Range Plot with Custom Binning | 4.3 Example of Custom Aggregation Function | 4.4 Range Plot with Step Plot Option

Last update: 2026-05-27
Started: 2025-09-23

Time Profile Plots
1. Introduction | 1.1 Setup | 1.2 Example Data | 1.2.1 Simulated and Observed Data | 1.2.2 MetaData | 2 Examples | 2.1 Plot Simulated Data Only | 2.1.1 Basic Example with Multiple Simulations | 2.1.2 Multiple Simulations with Confidence Interval | 2.2 Plot Observed Data Only | 2.2.1 Basic Example with Multiple Observed Data Sets | 2.2.2 Observed Data Sets with Confidence Interval | 2.2.3 Usage of Aesthetic "Error" | 2.2.4 Observed Data with LLOQ | 2.2.5 Omit Data Points Flagged as Missing Dependent Variable (MDV) | 2.3 Plot Simulated and Observed Data | 2.3.1 Corresponding Simulated and Observed Datasets with Common Legend Entry | 2.3.2 Corresponding Simulated and Observed Datasets with Separate Legend Entries and Mapping Table | 2.3.3 Independent Simulated and Observed Datasets | 2.3.4 Multiple Simulations and Observed Data Sets without Legends | 2.3.5 Observed Data with Shape as Gender | 2.3.6 Data with Secondary Axis | 3. Plot Configuration | 3.1 Example for Changing Geom Attributes | 3.2 Example for Changing Color Scales | 3.2.1 Without Mapping Table | 3.2.2 With Mapping Table | 3.3 Example for Adjusting X and Y Scale | 3.4 Adjust Time Unit

Last update: 2026-05-27
Started: 2025-09-12

Readme and manuals

Help Manual

Help pageTopics
Add LLOQ Layer with LLOQ LinesaddLLOQLayer
Add a watermark to a ggplot objectaddWatermark
add X-scaleaddXScale
Add X and Y ScaleaddXYScale
add y-scaleaddYScale
enumeration keys for OSPSuite.plots scaling options for axis scalingsAxisScales
enumeration keys for mode of BinningBINNINGMODE
Color mapscolorMaps
CombinedPlotCombinedPlot
Construct a Label with UnitconstructLabelWithUnit
Example Covariates DataexampleDataCovariates
Example Time Profile DataexampleDataTimeProfile
Export a ggplot object to a fileexportPlot
OSP Errorbar Layergeom_errorbar_osp
OSP Point Layergeom_point_osp
GeomErrorbarOspGeomErrorbarOsp
GeomPointOspGeomPointOsp
get the defaults for the geom attributes used as defaults in plot functions see 'vignette("ospsuite.plots", package = "ospsuite.plots")' how to change defaultsgetDefaultGeomAttributes
get list of default optionsgetDefaultOptions
creates a list with fold DistancesgetFoldDistanceList
returns an option value for a option defined by the package OSPSuite.plotsgetOspsuite.plots.option
Create a ggplot with an optional watermarkggplotWithWatermark
Initialize PlotinitializePlot
MappedDataMappedData
MappedDataBoxplotMappedDataBoxplot
object to map data for rangeplotsMappedDataRangeDistribution
MappedDataTimeProfileMappedDataTimeProfile
converts metaData List to a data frame row names specify propertiesmetaData2DataFrame
enumeration keys for OSPSuite.plots optionsOptionKeys
OSP Shape NamesospShapeNames
Create plot function for ggWatermark.plot.ggWatermark
Generate Box-Whisker PlotsplotBoxWhisker
Create a Forest PlotplotForest
Generates HistogramsplotHistogram
Generate Predicted vs Observed PlotsplotPredVsObs
generates residual quantile quantile plotplotQQ
Plot Range PlotplotRangeDistribution
Generate Plots of Ratios vs CovariateplotRatioVsCov
Generate Residual Plots vs CovariateplotResVsCov
generate time profile plotsplotTimeProfile
Base Plot for Residuals and Predictions vs CovariatesplotYVsX
Print method for ggWatermark objectsprint.ggWatermark
reset the default color map for discrete colorsresetDefaultColorMapDistinct
restore to previously stored settingsresetDefaults
reset the default themeresetDefaultTheme
OSP Shape Scalescale_shape_osp
OSP Shape Identity Scalescale_shape_osp_identity
OSP Shape Manual Scalescale_shape_osp_manual
set the default color-map for discrete colorssetDefaultColorMapDistinct
sets the defaults for the OSPSuite.plots packagesetDefaults
set the default themesetDefaultTheme
Set OSPSuite plots option with a given key and value.setOspsuite.plots.option
ShapesShapes
OSP Q-Q Statstat_qq_osp
adjust arguments for scale if dimension of scale is timeupdateScaleArgumentsForTimeUnit