Visualizes the border between screened tissue (environment) and everything beyond that is not included in the screening (periphery).

ggpLayerHorizonSAS(
  object,
  id,
  distance = distToEdge(object, id),
  line_alpha = 0.9,
  line_color = "black",
  line_size = 1.5,
  line_type = "solid",
  incl_edge = TRUE,
  incr_vert = FALSE,
  verbose = NULL,
  ...
)

Arguments

object

An object of class SPATA2 or, in case of S4 generics, objects of classes for which a method has been defined.

distance

Distance measure. Specifies the distance from the border of the spatial annotation to the horizon in the periphery up to which the screening is conducted. Defaults to a distance that covers the whole tissue section the spatial annotation is located on using distToEdge(). (This distance must not be exceeded.)

line_alpha

Numeric. Affects alpha of main lines of the plot.

line_color

Character. Affects color of the main lines of the plot.

line_size

Numeric. The size with which to display lines of the expression estimates.

line_type

Character. The line type. One of 'blank', 'solid', 'dashed', 'dotted', 'dotdash', 'longdash' and 'twodash'.

incl_edge

Logical. If TRUE, makes use of SPATA2 automatic tissue outline algorithm.

incr_vert

Logical value. If TRUE, the number of vertices of the polygon to be plotted is increased by linear interpolation. This can lead to smoother visualization but also to increased runtime.

verbose

Logical. If TRUE, informative messages regarding the computational progress will be printed.

(Warning messages will always be printed.)

...

Used to absorb deprecated arguments or functions.

Value

ggpLayer*()-functions return lists of ggproto objects that can be added to ggplots via the + operator. In most of the cases they are supposed to be added to plots created with the plotSurface*() family.

Examples


library(SPATA2)
library(tidyverse)

object <- loadExampleObject("UKF275T")

object <-
 createNumericAnnotations(
   object = object,
   variable = "HM_HYPOXIA",
   threshold = "kmeans_high",
   id = "hypoxia_ann",
   force1 = TRUE
   )

plotSurface(object, color_by = "HM_HYPOXIA", outline = T, pt_clrsp = "Reds 3") +
 ggpLayerHorizonSAS(object, id = "hypoxia_ann", distance = "3mm") +
 ggpLayerScaleBarSI(object, sb_pos = c("3mm", "2mm"))