From e71fd945a81a09e2155b8addb9ac1be543ffede5 Mon Sep 17 00:00:00 2001 From: HelenaLC Date: Sat, 9 May 2026 11:47:15 +0200 Subject: [PATCH 1/5] class renaminig --- R/plotFrame.R | 7 ++++--- R/plotImage.R | 4 ++-- man/plotFrame.Rd | 2 +- man/plotImage.Rd | 2 +- tests/testthat/test-plotArray.R | 2 +- tests/testthat/test-plotImage.R | 2 +- 6 files changed, 10 insertions(+), 9 deletions(-) diff --git a/R/plotFrame.R b/R/plotFrame.R index c45709e..4ef3a01 100644 --- a/R/plotFrame.R +++ b/R/plotFrame.R @@ -6,7 +6,7 @@ #' @param i character string or index; the label element to plot. #' @param assay character string; in case of \code{c} denoting a row name, #' specifies which \code{assay} data to use (see \code{\link{valTable}}). -#' (ignored when \code{x} is a \code{PointFrame}). +#' (ignored when \code{x} is a \code{SpatialDataPoint}). #' #' @examples #' x <- file.path("extdata", "blobs.zarr") @@ -38,9 +38,10 @@ NULL #' @importFrom ggplot2 aes theme scale_type geom_sf coord_sf #' @importFrom SpatialData transform #' @importFrom ggforce geom_circle +#' @importFrom methods is #' @importFrom utils tail .plot <- \(x, y, key=NULL, n=Inf, assay=1, i=1, ...) { - if (is(y, "PointFrame")) { + if (is(y, "SpatialDataPoint")) { if (!is.null(key)) { fk <- feature_key(y) y@data <- dplyr::filter(data(y), .data[[fk]] %in% key) @@ -49,7 +50,7 @@ NULL if (is.finite(n)) { n <- min(length(y), n) y <- y[sample(length(y), n)] - if (is(y, "ShapeFrame")) { + if (is(y, "SpatialDataShape")) { shape(x, i) <- y } else { point(x, i) <- y diff --git a/R/plotImage.R b/R/plotImage.R index 8ba581d..7b1fb65 100644 --- a/R/plotImage.R +++ b/R/plotImage.R @@ -12,7 +12,7 @@ #' 800 x 800px; use Inf to plot the lowest resolution available. #' @param ch image channel(s) to be used for plotting (defaults to #' the first channel(s) available); use \code{channels()} to see -#' which channels are available for a given \code{ImageArray} +#' which channels are available for a given \code{SpatialDataImage} #' @param c character vector; colors to use for each channel. #' @param cl list of length-2 numeric vectors (non-negative, increasing); #' specifies channel-wise contrast limits - defaults to [0, 1] for all @@ -128,7 +128,7 @@ NULL #' @importFrom methods is #' @noRd .is_rgb <- \(x) { - if (is(x, "ImageArray") && + if (is(x, "SpatialDataImage") && !is.null(md <- meta(x))) x <- channels(x) if (!is.vector(x)) stop("invalid 'x'") diff --git a/man/plotFrame.Rd b/man/plotFrame.Rd index 5d1835a..e424c18 100644 --- a/man/plotFrame.Rd +++ b/man/plotFrame.Rd @@ -19,7 +19,7 @@ \item{assay}{character string; in case of \code{c} denoting a row name, specifies which \code{assay} data to use (see \code{\link{valTable}}). -(ignored when \code{x} is a \code{PointFrame}).} +(ignored when \code{x} is a \code{SpatialDataPoint}).} } \description{ \code{SpatialData} point/shape viz. diff --git a/man/plotImage.Rd b/man/plotImage.Rd index 7657221..27786ff 100644 --- a/man/plotImage.Rd +++ b/man/plotImage.Rd @@ -23,7 +23,7 @@ scale in order to minimize memory-usage and blurring for a target size of \item{ch}{image channel(s) to be used for plotting (defaults to the first channel(s) available); use \code{channels()} to see -which channels are available for a given \code{ImageArray}} +which channels are available for a given \code{SpatialDataImage}} \item{c}{character vector; colors to use for each channel.} diff --git a/tests/testthat/test-plotArray.R b/tests/testthat/test-plotArray.R index f39a5cc..9505f7c 100644 --- a/tests/testthat/test-plotArray.R +++ b/tests/testthat/test-plotArray.R @@ -17,7 +17,7 @@ test_that("plotSpatialData()", { } test_that(".guess_scale", { - img <- ImageArray( + img <- SpatialDataImage( lys <- lapply( dim <- lapply(c(6, 3), \(.) c(3, rep(., 2))), \(.) array(sample(seq_len(255), prod(.), replace=TRUE), dim=.))) diff --git a/tests/testthat/test-plotImage.R b/tests/testthat/test-plotImage.R index 60fdbaa..a642488 100644 --- a/tests/testthat/test-plotImage.R +++ b/tests/testthat/test-plotImage.R @@ -14,7 +14,7 @@ test_that(".is_rgb()", { expect_false(.is_rgb(c("r", "g", "g"))) expect_true(.is_rgb(. <- c("r", "g", "b"))) expect_true(.is_rgb(rev(.))) - # only works for 'ImageArray' + # only works for 'SpatialDataImage' expect_true(.is_rgb(image(x, 1))) expect_error(.is_rgb(label(x, 1))) }) From 9cac3c54f77cf40a94058dba553815204fa6da1f Mon Sep 17 00:00:00 2001 From: HelenaLC Date: Sat, 9 May 2026 11:48:23 +0200 Subject: [PATCH 2/5] v0.99.6 --- DESCRIPTION | 2 +- inst/NEWS | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/DESCRIPTION b/DESCRIPTION index e2afed9..2194d94 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,7 +1,7 @@ Package: SpatialData.plot Title: SpatialData visualization Depends: R (>= 4.6), SpatialData -Version: 0.99.5 +Version: 0.99.6 Description: Visualization suit for 'SpatialData' (R). Current functionality includes handling of multiscale 'images', visualizing 'labels', 'points', and 'shapes'. For the latter, POINT, POLYGON, and MULTIPOLYGON geometries diff --git a/inst/NEWS b/inst/NEWS index 6626510..5d5fa2b 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,3 +1,7 @@ +changes in version 0.99.6 + +- renaming of 'SpatialData' classes + changes in version 0.99.5 - fix visualization of circles From 84954376242b9ba4967c2ae8a636e96325556078 Mon Sep 17 00:00:00 2001 From: HelenaLC Date: Sat, 9 May 2026 11:52:03 +0200 Subject: [PATCH 3/5] track changes --- inst/NEWS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/inst/NEWS b/inst/NEWS index 5d5fa2b..80598d1 100644 --- a/inst/NEWS +++ b/inst/NEWS @@ -1,6 +1,9 @@ changes in version 0.99.6 - renaming of 'SpatialData' classes +- improved visualization of labels +- fixed auto-contrasting for HnE images +- fixed channel-merging for multi-plex images changes in version 0.99.5 From c2df5acca4111b50b81a093aa3a29acdad9d0547 Mon Sep 17 00:00:00 2001 From: HelenaLC Date: Sat, 9 May 2026 12:28:47 +0200 Subject: [PATCH 4/5] fix tests --- R/plotFrame.R | 7 +- .../_snaps/plotSpatialData/overlays.svg | 4413 +++++++++-------- tests/testthat/test-plotShape.R | 4 +- tests/testthat/test-plotSpatialData.R | 4 +- 4 files changed, 2219 insertions(+), 2209 deletions(-) diff --git a/R/plotFrame.R b/R/plotFrame.R index 4ef3a01..4dc5940 100644 --- a/R/plotFrame.R +++ b/R/plotFrame.R @@ -44,7 +44,7 @@ NULL if (is(y, "SpatialDataPoint")) { if (!is.null(key)) { fk <- feature_key(y) - y@data <- dplyr::filter(data(y), .data[[fk]] %in% key) + y<- dplyr::filter(y, .data[[fk]] %in% key) } } if (is.finite(n)) { @@ -73,11 +73,14 @@ NULL if (val %in% names(df)) { if (scale_type(df[[arg]]) == "discrete") df[[val]] <- factor(df[[arg]]) - aes[[arg]] <- aes(.data[[val]])[[1]] + col <- match(arg, c("col", "color", "colour")) + .arg <- ifelse(!is.na(col), "colour", arg) + aes[[.arg]] <- aes(.data[[val]])[[1]] dot[[arg]] <- NULL } } } + if ("radius" %in% names(df)) df <- st_buffer(df, df$radius) list( diff --git a/tests/testthat/_snaps/plotSpatialData/overlays.svg b/tests/testthat/_snaps/plotSpatialData/overlays.svg index 3e84c58..7679270 100644 --- a/tests/testthat/_snaps/plotSpatialData/overlays.svg +++ b/tests/testthat/_snaps/plotSpatialData/overlays.svg @@ -20,2291 +20,2296 @@ - - + + - - + + - - + + - + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - 0 -10 -20 -30 -40 -50 -60 - - - - - - - -y - - - - - - - - 0 -10 -20 -30 -40 -50 -60 -x -layered + 0 +10 +20 +30 +40 +50 +60 + + + + + + + +y + + + + + + + + 0 +10 +20 +30 +40 +50 +60 +x +layered - - + + - - - - + + + + - 0 -10 -20 -30 -40 -50 -60 - - - - - - - -y - - - - - - - - 0 -10 -20 -30 -40 -50 -60 -x -image + 0 +10 +20 +30 +40 +50 +60 + + + + + + + +y + + + + + + + + 0 +10 +20 +30 +40 +50 +60 +x +image - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -10 -20 -30 -40 -50 -60 - - - - - - -y - - - - - - -10 -20 -30 -40 -50 -60 -x -labels +10 +20 +30 +40 +50 +60 + + + + + + +y + + + + + + +10 +20 +30 +40 +50 +60 +x +labels - - + + - - - - - - - - + + + + + + + + -20 -25 -30 -35 -40 -45 -50 - - - - - - - - - - - - - - - -15 -20 -25 -30 -35 -40 -45 -50 -circles +20 +25 +30 +35 +40 +45 +50 + + + + + + + + + + + + + + + +15 +20 +25 +30 +35 +40 +45 +50 +circles - - + + - - - - - - - - + + + + + + + + -25 -30 -35 -40 -45 -50 -55 - - - - - - - - - - - - - - - -20 -25 -30 -35 -40 -45 -50 -55 -polygons +25 +30 +35 +40 +45 +50 +55 + + + + + + + + + + + + + + + +20 +25 +30 +35 +40 +45 +50 +55 +polygons - - + + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -10 -20 -30 -40 -50 -60 - - - - - - - - - - - - -10 -20 -30 -40 -50 -60 -points -overlays +10 +20 +30 +40 +50 +60 + + + + + + + + + + + + +10 +20 +30 +40 +50 +60 +genes + + +gene_a +gene_b +points +overlays diff --git a/tests/testthat/test-plotShape.R b/tests/testthat/test-plotShape.R index d392227..bcc76f8 100644 --- a/tests/testthat/test-plotShape.R +++ b/tests/testthat/test-plotShape.R @@ -1,5 +1,7 @@ +require(sf, quietly=TRUE) require(ggplot2, quietly=TRUE) require(SpatialData, quietly=TRUE) + x <- file.path("extdata", "blobs.zarr") x <- system.file(x, package="SpatialData") x <- readSpatialData(x, tables=FALSE) @@ -40,7 +42,7 @@ test_that("plotShape(),polygons", { geom <- layer_data(q)$geometry expect_s3_class(q, "ggplot") df <- centroids(y) - fd <- st_coordinates(geom) + fd <- st_coordinates(st_centroid(geom)) .f <- \(.) as.matrix(.[,c(1,2)]) expect_equivalent(.f(df), .f(fd)) expect_s3_class(geom, "sfc_POLYGON") diff --git a/tests/testthat/test-plotSpatialData.R b/tests/testthat/test-plotSpatialData.R index f38a308..ca02d4c 100644 --- a/tests/testthat/test-plotSpatialData.R +++ b/tests/testthat/test-plotSpatialData.R @@ -9,7 +9,7 @@ test_that("regression test of overlays", { plotLabel(x, a=1/3) + plotShape(x, 1) + plotShape(x, 3) + - plotPoint(x, c="genes") + + plotPoint(x, col="genes") + ggplot2::ggtitle("layered") # split one <- list( @@ -17,7 +17,7 @@ test_that("regression test of overlays", { p + plotLabel(x) + ggplot2::ggtitle("labels"), p + plotShape(x, 1) + ggplot2::ggtitle("circles"), p + plotShape(x, 3) + ggplot2::ggtitle("polygons"), - p + plotPoint(x, c="genes") + ggplot2::ggtitle("points")) + p + plotPoint(x, col="genes") + ggplot2::ggtitle("points")) fig <- patchwork::wrap_plots(c(list(all), one), nrow=2) vdiffr::expect_doppelganger("overlays", fig) From e38093dc3f6b93df66de023f1a9430f4a9eb2195 Mon Sep 17 00:00:00 2001 From: HelenaLC Date: Sat, 9 May 2026 12:43:05 +0200 Subject: [PATCH 5/5] code ident --- tests/testthat/test-plotSpatialData.R | 44 +++++++++++++-------------- 1 file changed, 22 insertions(+), 22 deletions(-) diff --git a/tests/testthat/test-plotSpatialData.R b/tests/testthat/test-plotSpatialData.R index ca02d4c..59f5977 100644 --- a/tests/testthat/test-plotSpatialData.R +++ b/tests/testthat/test-plotSpatialData.R @@ -1,24 +1,24 @@ test_that("regression test of overlays", { - x <- system.file("extdata", "blobs.zarr", package="SpatialData") |> - readSpatialData() - - p <- plotSpatialData() - # joint - all <- p + - plotImage(x) + - plotLabel(x, a=1/3) + - plotShape(x, 1) + - plotShape(x, 3) + - plotPoint(x, col="genes") + - ggplot2::ggtitle("layered") - # split - one <- list( - p + plotImage(x) + ggplot2::ggtitle("image"), - p + plotLabel(x) + ggplot2::ggtitle("labels"), - p + plotShape(x, 1) + ggplot2::ggtitle("circles"), - p + plotShape(x, 3) + ggplot2::ggtitle("polygons"), - p + plotPoint(x, col="genes") + ggplot2::ggtitle("points")) - fig <- patchwork::wrap_plots(c(list(all), one), nrow=2) - - vdiffr::expect_doppelganger("overlays", fig) + zs <- system.file("extdata", "blobs.zarr", package="SpatialData") + x <- readSpatialData(zs) + + p <- plotSpatialData() + # joint + all <- p + + plotImage(x) + + plotLabel(x, a=1/3) + + plotShape(x, 1) + + plotShape(x, 3) + + plotPoint(x, col="genes") + + ggplot2::ggtitle("layered") + # split + one <- list( + p + plotImage(x) + ggplot2::ggtitle("image"), + p + plotLabel(x) + ggplot2::ggtitle("labels"), + p + plotShape(x, 1) + ggplot2::ggtitle("circles"), + p + plotShape(x, 3) + ggplot2::ggtitle("polygons"), + p + plotPoint(x, col="genes") + ggplot2::ggtitle("points")) + fig <- patchwork::wrap_plots(c(list(all), one), nrow=2) + + vdiffr::expect_doppelganger("overlays", fig) })