Skip to content

Commit 683ea42

Browse files
committed
+contrasts/saturation examples
1 parent 0959ccf commit 683ea42

File tree

2 files changed

+58
-18
lines changed

2 files changed

+58
-18
lines changed

vignettes/SpatialData.plot.Rmd

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,12 +279,32 @@ x <- readSpatialData(pa, anndataR=FALSE)
279279
Plotting with multiple image channels.
280280

281281
```{r steinbock-plot}
282-
plotSpatialData() + plotImage(x,
282+
plotSpatialData() + plotImage(x,
283283
i="Patient3_003_image",
284284
ch=c(6, 22, 39),
285285
c=c("blue", "cyan", "yellow"))
286286
```
287287

288+
### aesthetics
289+
290+
```{r saturation, fig.width=9, fig.height=3}
291+
p <- plotSpatialData()
292+
i <- image(x, "Patient3_003_image")
293+
image(x, "crop") <- i[, 200:400, 200:400]
294+
lapply(c(1, 0.7, 0.4), \(.) {
295+
p + plotImage(x, "crop", sat=c(1.4, 1.2, .),
296+
ch=c(6, 22, 39), c=c("blue", "cyan", "yellow"))
297+
}) |> wrap_plots(nrow=1)
298+
```
299+
300+
```{r contrasts, fig.width=9, fig.height=3}
301+
lapply(list(c(0, 1), c(0.2, 1), c(0, 0.8)), \(.) {
302+
p + plotImage(x, "crop",
303+
lim=list(c(0, 1), c(0, 1), .),
304+
ch=c(6, 22, 39), c=c("blue", "cyan", "yellow"))
305+
}) |> wrap_plots(nrow=1)
306+
```
307+
288308
# Masking
289309

290310
Back to blobs...

0 commit comments

Comments
 (0)