Uses Rs base plotting device instead of ggplot2. This is usually faster but can not make use of the mechanism ggplot2 offers.

plotSurfaceBase(
  object,
  color_by = NULL,
  alpha_by = NULL,
  pt_alpha = 0.9,
  pt_color = "grey",
  pt_clrp = "milo",
  pt_clrsp = "inferno",
  pt_size = 1,
  clrp_adjust = NULL,
  smooth = FALSE,
  smooth_span = 0.2,
  display_axes = FALSE,
  display_image = NULL,
  highlight_barcodes = NULL,
  highlight_alpha = 0.75,
  highlight_color = "orange",
  xrange = NULL,
  yrange = NULL,
  adjust_pt_size = TRUE,
  expand = 0,
  pty = "s",
  verbose = NULL,
  ...
)

Arguments

object

An object of class spata2.

color_by

The variable to be displayed by color:

  • Gene set as a single character value. Must be in getGeneSets()

  • Genes as a character vector. If more than one gene is specified the average expression of those genes will be calculated and displayed. Must be in getGenes()

  • Feature as a single character value. Must be in getFeaturenNames()

pt_alpha

Numeric value. Specifies the degree of transparency of all points.

pt_clrp

The color palette to be used if the specified variable displayed by color is categorical/discrete. Run validColorPalettes() to see valid input.

pt_clrsp

The color spectrum to be used if the specified variable displayed by color is continuous. Run validColorSpectra() to see valid input.

pt_size

Numeric value. Specifies the size of all points.

clrp_adjust

Named character vector or NULL. If character, it adjusts the color palette that is used to represent the groups. Names of the input vector must refer to the group and the respective named element denotes the color with which to represent the group.

smooth

Logical. If TRUE, a loess fit is used to smooth the values.

smooth_span

Numeric value. Controls the degree of smoothing. Given to argument span of stats::loess().

display_image

Logical. If set to TRUE the histology image of the specified sample is displayed underneath the plot.

xrange, yrange

Vector of length two or NULL. If not NULL, specifies the x- and y-range to which the output image is cropped. E.g. xrange = c(200, 500) results in the image being cropped from x-coordinate 200px up to x-coordinate 500px. If NULL, the original image ranges are taken.

This argument works within the SPATA2 distance framework. If values are specified in European units of length the input is immediately converted to pixel units. See info section Distance measures for more information.

expand

Specifies image expansion. An image that is cropped based on an image annotation centers around the image annotation. If expand = 0, the default, the dimensions of the image, that is width/x-axis and height/y-axis, are set to include only the image annotation area and nothing more. Using expand, the cropped image section can be adjusted. See section Expansion of cropped image sections for more information.

verbose

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

(Warning messages will always be printed.)

...

Used to absorb deprecated arguments or functions.

Value

Plots right into the plotting window.