Skip to content

Commit

Permalink
+contrasts/saturation examples
Browse files Browse the repository at this point in the history
  • Loading branch information
HelenaLC committed Nov 25, 2024
1 parent 0959ccf commit 683ea42
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 18 deletions.
22 changes: 21 additions & 1 deletion vignettes/SpatialData.plot.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -279,12 +279,32 @@ x <- readSpatialData(pa, anndataR=FALSE)
Plotting with multiple image channels.

```{r steinbock-plot}
plotSpatialData() + plotImage(x,
plotSpatialData() + plotImage(x,
i="Patient3_003_image",
ch=c(6, 22, 39),
c=c("blue", "cyan", "yellow"))
```

### aesthetics

```{r saturation, fig.width=9, fig.height=3}
p <- plotSpatialData()
i <- image(x, "Patient3_003_image")
image(x, "crop") <- i[, 200:400, 200:400]
lapply(c(1, 0.7, 0.4), \(.) {
p + plotImage(x, "crop", sat=c(1.4, 1.2, .),
ch=c(6, 22, 39), c=c("blue", "cyan", "yellow"))
}) |> wrap_plots(nrow=1)
```

```{r contrasts, fig.width=9, fig.height=3}
lapply(list(c(0, 1), c(0.2, 1), c(0, 0.8)), \(.) {
p + plotImage(x, "crop",
lim=list(c(0, 1), c(0, 1), .),
ch=c(6, 22, 39), c=c("blue", "cyan", "yellow"))
}) |> wrap_plots(nrow=1)
```

# Masking

Back to blobs...
Expand Down
Loading

0 comments on commit 683ea42

Please sign in to comment.