Plot function for Seurat/Kandinsky data, as an alternative to Seurat SpatialDim/SpatialFeature plots
KanPlot(
seurat = NULL,
feature = NULL,
fovs = NULL,
assay = DefaultAssay(seurat),
layer = "data",
palette_cont = "inferno",
palette_discrete = c24,
alpha = NULL,
show_border = F,
border.size = NULL,
border.col = "black",
max.cap = 0.99,
bg_img = F,
bg_type = c("img", "mask"),
max.px = 5e+05,
theme = c("dark", "light"),
pt.shape = c(16, 21),
pt.stroke = 0.1,
pt.size = 0.1,
lg.pt.size = 2
)
a Seurat object containing Kandinsky data (`KanData()`)
character string specifying the discrete or continuous variable to plot
vector of fov identifiers selected for plotting. If NULL (default), all fovs will be considered for plotting
the name of Seurat assay to use to search for the feature to plot
the name of Seurat layer to use to search for the feature to plot
character string or vector specifying the color palette to use for continuous variables. It can be a vector of color names, or the name of a `viridis` palette
character string or vector specifying the color palette to use for discrete variables.
numeric value between 0 and 1 specifying the level of transparency to apply to polygon/spots/bins. 0 means completely transparent, 1 mean means completely opaque. If not specified, default value is set to 1.
boolean, whether plotting (TRUE) or not (FALSE) polygon borders.
numeric, polygon border thickness passed to `lwd` parameter of geom_sf() function when `show_border` is set to TRUE. If not specified, default value is set to 0.01
color of polygon borders when `show_border` is set to TRUE.
numeric value between 0 and 1 specifying the higher percentile cutoff value for continuous variables. Default value is set to 0.99
boolean, whether plotting (TRUE) or not (FALSE) any image associated with Kandinsky data, like Visium H&E image,in the plot background.
image type to be plotted in the background when `bg_img = TRUE`. Must be one of the following: `img`, `mask`.
numeric value indicating the number of pixels to plot from the background image, when `bg_img = TRUE`. higher values will give a better resolution and a heavier image size
color style of the plot background and text. Must one of the following: `dark`, `light`.
numeric, shape to apply to point geometries. Must be one of the following: 16 (no border), 21 (with border, default)
numeric, size of point borders. Only applied when pt.shape is set to 21 (default). Default is 0.1
numeric, point size to apply to centroids (when no polygons are available)
numeric, size of points reported in plot legend (when no polygons are available)
plot object generated with ggplot