Skip to content

Commit

Permalink
enh: pass xlim ylim setting to image
Browse files Browse the repository at this point in the history
  • Loading branch information
jiajic committed Nov 18, 2024
1 parent 9612f07 commit e8452cc
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion R/vis_spatial_in_situ.R
Original file line number Diff line number Diff line change
Expand Up @@ -189,14 +189,20 @@ spatInSituPlotPoints <- function(
## 0. plot image ##
if (isTRUE(show_image) &&
!is.null(gimage)) {

if (!is.null(xlim) && !is.null(ylim)) {
e <- ext(c(xlim, ylim))
}

plot <- plot_spat_image_layer_ggplot(
gg_obj = plot,
gobject = gobject,
spat_unit = spat_unit,
feat_type = feat_type,
spat_loc_name = spat_loc_name,
polygon_feat_type = polygon_feat_type,
gimage = gimage
gimage = gimage,
ext = e
)

if (isTRUE(verbose)) wrap_msg("plot image layer done")
Expand Down

0 comments on commit e8452cc

Please sign in to comment.