SmoothPlot: Graphs a smooth interpolation heatmap colored by continuous...

SmoothPlotR Documentation

Graphs a smooth interpolation heatmap colored by continuous variable, e.g. dimensional reduction vector

Description

Graphs a smooth interpolation heatmap colored by continuous variable, e.g. dimensional reduction vector

Usage

SmoothPlot(
  st.object,
  data,
  image.type,
  data.type = NULL,
  variable,
  palette = "MaYl",
  cols = NULL,
  ncol = NULL,
  center.zero = TRUE,
  dark.theme = FALSE,
  highlight.edges = TRUE,
  ...
)

Arguments

st.object

A Staffli object

data

Object of class 'data.frame' containing at least (x, y) coordinates, a "sample" vector with labels for each sample and one column with the feature values. Can also include an additional column for shapes.

image.type

Specifies the image is "processed", otherwise NULL

data.type

String specifying the class of the features in data to be plotted

variable

Name of feature column

palette

Color palette used for spatial heatmap (see palette.select(info = T) for available options). Disabled if a color vector is provided (see cols below).

cols

A vector of colors to use for colorscale, e.g. cols = c("blue", "white", "red") will create a gradient color scale going from blue to white to red. This options will deactivate the palette option.

ncol

Number of columns to arrange the samples into. This can for example be useful to adjust if you want to visualize the samples in just in one row or one column.

center.zero

Specifies whther or not the colorscale should be centered around 0. For some values, such as Principal Component vectors, the distribution of values is centered at 0 and in that case it can be appropriate to use a divergent colorscale with a predefined value for 0. If this parameter is set to TRUE, the ggplot2 function scale_color_gradient2 will be used to control the coloring instead of scale_color_gradientn. If center.zero is set to FALSE, the colorscale will simply map the values in equally spaced intervals which could skew the interpretaion of the output plot.

dark.theme

Switches color of scalebar to 'white'

highlight.edges

Should edges be highlighted? [default: TRUE]

...

Parameters passed to geom_point()


jbergenstrahle/STUtility documentation built on March 14, 2023, 7:15 a.m.