clusterPlot {BayesSpace} | R Documentation

## Plot spatial cluster assignments.

### Description

Plot spatial cluster assignments.

### Usage

    clusterPlot(
      sce,
      label = "spatial.cluster",
      palette = NULL,
      color = NULL,
      platform = NULL,
      is.enhanced = NULL,
      ...
    )

### Arguments

`sce` | SingleCellExperiment. If `fill` is specified and is a string, it must exist as a column in `colData(sce)`.
`label` | Labels used to color each spot. May be the name of a column in `colData(sce)`, or a vector of discrete values.
`palette` | Optional vector of hex codes to use for discrete spot values.
`color` | Optional hex code to set color of borders around spots. Set to `NA` to remove borders.
`platform` | Spatial sequencing platform. If "Visium", the hex spot layout will be used, otherwise square spots will be plotted. NOTE: specifying this argument is only necessary if `sce` was not created by `spatialCluster()` or `spatialEnhance()`.
`is.enhanced` | True if `sce` contains subspot-level data instead of spots. Spatial sequencing platform. If true, the respective subspot lattice for each platform will be plotted. NOTE: specifying this argument is only necessary if `sce` was not created by `spatialCluster()` or `spatialEnhance()`.
`...` | Additional arguments for `geom_polygon()`. `size`, to specify the linewidth of these borders, is likely the most useful.

### Value

Returns a ggplot object.

### See Also

Other spatial plotting functions: `featurePlot()`

### Examples

    sce <- exampleSCE()
    clusterPlot(sce)

[Package BayesSpace version 1.0.0 Index]