Skip to content

Flip coordinates in plotImage()#23

Merged
Bisaloo merged 2 commits into
mainfrom
coord-flip
May 6, 2026
Merged

Flip coordinates in plotImage()#23
Bisaloo merged 2 commits into
mainfrom
coord-flip

Conversation

@Bisaloo
Copy link
Copy Markdown
Collaborator

@Bisaloo Bisaloo commented May 6, 2026

Alternative to #21

library(SpatialData.plot)
#> Loading required package: SpatialData
#> 
#> Attaching package: 'SpatialData'
#> The following object is masked from 'package:stats':
#> 
#>     filter
#> The following object is masked from 'package:utils':
#> 
#>     data
#> The following objects are masked from 'package:base':
#> 
#>     labels, scale, sequence, table, transform

sd <- SpatialData.data::LungAdenocarcinomaMCMICRO()
sp <- crop(sd, list(
  xmin=0, xmax=2500,
  ymin=600, ymax=3200))
# original
plotSpatialData() + plotImage(sd,
  ch=c("CD16", "CD45", "FOXP3", "DNA_7", "ECAD", "SMA"),
  c=c("cyan", "magenta", "yellow", "blue", "green", "red"))

# cropped
plotSpatialData() + plotImage(sp,
  ch=c("CD16", "CD45", "FOXP3", "DNA_7", "ECAD", "SMA"),
  c=c("cyan", "magenta", "yellow", "blue", "green", "red"))

Created on 2026-05-06 with reprex v2.1.1

@Bisaloo Bisaloo merged commit c7f6514 into main May 6, 2026
5 checks passed
@Bisaloo Bisaloo deleted the coord-flip branch May 8, 2026 08:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant