diff --git a/R/plotImage.R b/R/plotImage.R index af48765..af979e4 100644 --- a/R/plotImage.R +++ b/R/plotImage.R @@ -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. \ No newline at end of file