Skip to content

Commit 25a7320

Browse files
authored
Fixes #536 watermark position independent from scales (#537)
* Fixes #536 watermark position independent from scales * Update test snapshots
1 parent 822d831 commit 25a7320

File tree

8 files changed

+16
-79
lines changed

8 files changed

+16
-79
lines changed

R/utilities-background.R

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -270,7 +270,7 @@ addWatermark <- function(plotObject,
270270

271271
watermark <- createWatermarkGrob(label = watermark, alpha = alpha)
272272

273-
plotObject <- plotObject + ggplot2::annotation_custom(grob = watermark, xmin = -Inf, ymin = -Inf, xmax = Inf, ymax = Inf)
273+
plotObject <- plotObject + ggplot2::annotation_custom(grob = watermark, xmin = I(-Inf), ymin = I(-Inf), xmax = I(Inf), ymax = I(Inf))
274274

275275
return(plotObject)
276276
}
@@ -345,7 +345,7 @@ setWatermark <- function(plotObject,
345345
watermark = watermarkConfiguration,
346346
alpha = alpha
347347
)
348-
newPlotObject$layers[[1]] <- dummyPlot$layer[[1]]
348+
newPlotObject$layers[[1]] <- dummyPlot$layers[[1]]
349349
return(newPlotObject)
350350
}
351351

tests/testthat/_snaps/pkratio/pkratioplot.svg

Lines changed: 2 additions & 11 deletions
Loading

tests/testthat/_snaps/plot-obs-vs-pred/basic.svg

Lines changed: 2 additions & 11 deletions
Loading

tests/testthat/_snaps/plot-obs-vs-pred/fold-distance-many-folds-diagonal.svg

Lines changed: 2 additions & 11 deletions
Loading

tests/testthat/_snaps/plot-obs-vs-pred/fold-distance-many-folds.svg

Lines changed: 2 additions & 11 deletions
Loading

tests/testthat/_snaps/plot-obs-vs-pred/fold-distance-one-fold.svg

Lines changed: 2 additions & 11 deletions
Loading

tests/testthat/_snaps/plot-obs-vs-pred/fold-distance-several-folds.svg

Lines changed: 2 additions & 11 deletions
Loading

tests/testthat/_snaps/plot-obs-vs-pred/fold-distance-simple-abline.svg

Lines changed: 2 additions & 11 deletions
Loading

0 commit comments

Comments
 (0)