Plot grid from metadata.
Arguments
- spe
A SpatialExperiment object.
- group.by
values to group polygons by. Must be in colData of spe. If NULL, will try with col if available.
- cols
Colour palette. Can be a vector of colours or a function that accepts an integer n and return n colours.
- pol.border
Boolean. Whether to draw border for each polygon.
- pol.alpha
alpha of points between 0 and 1.
- probs
Numeric value between 0 and 1, used for filtering uninformative grid. Only applicable for continuous values.
Examples
data("xenium_bc_spe")
spe <- gridDensity(spe)
plotGrid(spe, group.by = "x_grid")