petab_plotData | R Documentation |
Automatic multipage export in the background with the future package and ggforce::facet_wrap_paginate
petab_plotData( petab, i, j, aeslist = NULL, FLAGUseObservableTransformation = TRUE, FLAGmeanLine = TRUE, ggCallback = list(), ... )
petab |
A petab object |
aeslist |
list of formulas used to call |
FLAGmeanLine |
draw line connecting the means of groups defined by c("observableId", "time", "conditionId", names(aeslist)= |
ggCallback |
additional stuff to add to the ggplot, such as a call to |
... |
Arguments to |
FLAGfuture |
export asynchronously with the future package |
ggplot
Daniel Lill (daniel.lill@physik.uni-freiburg.de)
Other plotting:
pd_plotParsParallelLines()
,
pd_plotProfilePaths()
,
pd_plotProfile()
,
petab_plotHelpers_aeslist()
,
petab_plotHelpers_meanMeasurementsValue()
,
petab_plotHelpers_parameterOrder()
,
petab_plotHelpers_variableOrder()
,
stepMax
pe <- petab_exampleRead(exampleName = "03", "pe") # Plot data petab_plotData(pe) # Plot dose response: subset and remap aes(x) petab_plotData(pe, i = conditionName == "dose response 30 min", aeslist = list(x = ~Epo)) # Change layout, scale and theme via ggCallback petab_plotData(pe, i = conditionName == "dose response 30 min", aeslist = list(x = ~Epo), ggCallback = list(facet_wrap(~observableId, scales = "free"), scale_x_log10(breaks =unique(pe$experimentalCondition[conditionName=="dose response 30 min", Epo])), theme_bw())) # Add datapointId, plot data points with labels pe <- petab_exampleRead(exampleName = "01", "pe") pe <- petab_mutateDCO(pe,j=`:=`(datapointId = paste0(datasetId, "_", 1:.N))) petab_plotData(pe, ggCallback = list(facet_wrap(~observableId, scales = "free"), ggrepel::geom_text_repel(aes(x= time, y = measurement, label = datapointId), color = "grey", size = 2))) # Save plot to multipage pdf td <- tempdir() petab_plotData(pe, ggCallback = list(facet_wrap_paginate(~observableId, nrow = 1, ncol = 2, scales = "free"), ggrepel::geom_text_repel(aes(x= time, y = measurement, label = datapointId), color = "grey", size = 1)), filename = file.path(td, "plot.pdf"), width = 15.5, heightrel = 8/16, scale = 1, units = "cm") system(paste0("nautilus ", td), wait = FALSE) # Display second page of multipage plot interactively petab_plotData(pe, ggCallback = list(facet_wrap_paginate(~observableId, nrow = 1, ncol = 2, scales = "free", page = 2), ggrepel::geom_text_repel(aes(x= time, y = measurement, label = datapointId), color = "grey", size = 1)))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.