Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion R/plotImage.R
Original file line number Diff line number Diff line change
Expand Up @@ -221,4 +221,8 @@ setMethod("plotImage", "SpatialData", \(x, i=1, j=1, k=NULL, ch=NULL, c=NULL, cl
#' @export
#' @rdname plotImage
#' @importFrom ggplot2 ggplot scale_y_reverse coord_fixed
plotSpatialData <- \() ggplot() + coord_fixed() + .theme
plotSpatialData <- \() ggplot() + scale_y_reverse() + coord_fixed() + .theme
# `annotation_raster` plots the array the same way it is printed, i.e., with the
# row 1 at the top, which means we need to flip the y-axis to have the correct axis labels.
# We tried flipping the image itself but it means everything gets out of alignement if
# the user sets `scale_y_reverse()` themselves.
Loading