Skip to content

Commit 6c82f94

Browse files
run tests setDefault to all
1 parent 94f88bc commit 6c82f94

25 files changed

+5439
-1045
lines changed

R/messages.R

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -231,12 +231,6 @@ messages$plotShowLegendPerDatasetHasNoEffect <- function(dataType) {
231231
)
232232
}
233233

234-
messages$plotShowLegendPerDatasetSimulatedNotSupported <- function() {
235-
paste0(
236-
"showLegendPerDataset = 'simulated' has no effect for this plot type. ",
237-
"Simulated data is represented as axis values, not as separate points or lines."
238-
)
239-
}
240234

241235
messages$plotUntypicalAesthetic <- function(aesthetic, dataType) {
242236
sprintf(

R/plot-with-ospsuite-plots.R

Lines changed: 8 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -224,11 +224,9 @@ plotTimeProfile <- function(
224224
#' (1) will be included if specified in `getFoldDistanceList`.
225225
#' @param showLegendPerDataset Controls display of separate legend entries for
226226
#' individual datasets. One of:
227-
#' - `"none"` (default): No per-dataset differentiation. Only group-level legend.
228-
#' - `"all"` or `"observed"`: Differentiate observed datasets via different
227+
#' - `"none"` : No per-dataset differentiation. Only group-level legend.
228+
#' - `"all"` (default) or `"observed"`: Differentiate observed datasets via different
229229
#' shapes (using the `name` column).
230-
#' - `"simulated"`: Issues a warning; simulated data is represented as axis
231-
#' values, not as separate visual elements, so this setting has no effect.
232230
#'
233231
#' User-provided `mapping` will override internal settings.
234232
#' @inheritDotParams ospsuite.plots::plotYVsX xScaleArgs yScaleArgs groupAesthetics addRegression geomPointAttributes geomErrorbarAttributes geomComparisonLineAttributes geomLLOQAttributes addGuestLimits deltaGuest labelGuestCriteria geomGuestLineAttributes lloqOnBothAxes
@@ -259,12 +257,12 @@ plotPredictedVsObserved <- function(
259257
xyScale = "log",
260258
predictedAxis = "y",
261259
comparisonLineVector = ospsuite.plots::getFoldDistanceList(folds = c(2)),
262-
showLegendPerDataset = "none",
260+
showLegendPerDataset = "all",
263261
...
264262
) {
265263
checkmate::assertChoice(
266264
showLegendPerDataset,
267-
choices = c("none", "all", "observed", "simulated")
265+
choices = c("none", "all", "observed")
268266
)
269267

270268
# Validate predictedAxis parameter
@@ -371,11 +369,9 @@ plotPredictedVsObserved <- function(
371369
#' unit in the data is used. For available units, see `ospsuite::ospUnits`.
372370
#' @param showLegendPerDataset Controls display of separate legend entries for
373371
#' individual datasets. One of:
374-
#' - `"none"` (default): No per-dataset differentiation. Only group-level legend.
375-
#' - `"all"` or `"observed"`: Differentiate observed datasets via different
372+
#' - `"none"`: No per-dataset differentiation. Only group-level legend.
373+
#' - `"all"` (default) or `"observed"`: Differentiate observed datasets via different
376374
#' shapes (using the `name` column).
377-
#' - `"simulated"`: Issues a warning; simulated data is represented as axis
378-
#' values, not as separate visual elements, so this setting has no effect.
379375
#'
380376
#' User-provided `mapping` will override internal settings.
381377
#' @inheritDotParams ospsuite.plots::plotYVsX xScale xScaleArgs yScale yScaleArgs groupAesthetics addRegression geomPointAttributes geomErrorbarAttributes geomComparisonLineAttributes geomLLOQAttributes
@@ -414,14 +410,14 @@ plotResidualsVsCovariate <- function(
414410
yUnit = NULL,
415411
residualScale = "log",
416412
xAxis = "observed",
417-
showLegendPerDataset = "none",
413+
showLegendPerDataset = "all",
418414
...
419415
) {
420416
predicted <- NULL
421417

422418
checkmate::assertChoice(
423419
showLegendPerDataset,
424-
choices = c("none", "all", "observed", "simulated")
420+
choices = c("none", "all", "observed")
425421
)
426422

427423
# Validate xAxis parameter
@@ -1329,11 +1325,6 @@ plotQuantileQuantilePlot <- function(
13291325
)
13301326
}
13311327

1332-
# Warn if simulated differentiation is requested (not applicable)
1333-
if (showLegendPerDataset %in% c("simulated")) {
1334-
warning(messages$plotShowLegendPerDatasetSimulatedNotSupported())
1335-
}
1336-
13371328
mapping <- structure(
13381329
utils::modifyList(mapping, userMapping),
13391330
class = "uneval"
@@ -1391,11 +1382,6 @@ plotQuantileQuantilePlot <- function(
13911382
)
13921383
}
13931384

1394-
# Warn if simulated differentiation is requested (not applicable)
1395-
if (showLegendPerDataset %in% c("simulated")) {
1396-
warning(messages$plotShowLegendPerDatasetSimulatedNotSupported())
1397-
}
1398-
13991385
# delete columns not needed
14001386
plotData <- plotData[,
14011387
which(colSums(is.na(plotData)) != nrow(plotData)),

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/aciclovir.svg

Lines changed: 32 additions & 16 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/default-1-fold-dist.svg

Lines changed: 157 additions & 44 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/default-3-fold-dist.svg

Lines changed: 157 additions & 44 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/defaults-without-lines.svg

Lines changed: 157 additions & 44 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/defaults.svg

Lines changed: 175 additions & 62 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/lloq-vertical.svg

Lines changed: 40 additions & 29 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/mixed-errors-predicted-on-x-axis.svg

Lines changed: 54 additions & 32 deletions
Loading

tests/testthat/_snaps/plot-with-ospsuite-plots-PredictedVsObserved/multiple-data-sets-one-group.svg

Lines changed: 53 additions & 31 deletions
Loading

0 commit comments

Comments
 (0)