3D-Dimensional reduction plot for gene expression visualization.
Source:R/SCP-plot.R
      FeatureDimPlot3D.RdPlotting cell points on a reduced 3D space and coloring according to the gene expression in the cells.
Usage
FeatureDimPlot3D(
  srt,
  features,
  reduction = NULL,
  dims = c(1, 2, 3),
  axis_labs = NULL,
  split.by = NULL,
  slot = "data",
  assay = NULL,
  calculate_coexp = FALSE,
  pt.size = 1.5,
  cells.highlight = NULL,
  cols.highlight = "black",
  shape.highlight = "circle-open",
  sizes.highlight = 2,
  width = NULL,
  height = NULL,
  save = NULL,
  force = FALSE
)Arguments
- srt
- A Seurat object. 
- features
- A character vector or a named list of features to plot. Features can be gene names in Assay or names of numeric columns in meta.data. 
- reduction
- Which dimensionality reduction to use. If not specified, will use the reduction returned by - DefaultReduction.
- dims
- Dimensions to plot, must be a two-length numeric vector specifying x- and y-dimensions. 
- axis_labs
- A character vector of length 3 indicating the labels for the axes. 
- split.by
- Name of a column in meta.data to split plot by. 
- slot
- Which slot to pull expression data from? Default is - data.
- assay
- Which assay to pull expression data from. If - NULL, will use the assay returned by- DefaultAssay.
- calculate_coexp
- Whether to calculate the co-expression value (geometric mean) of the features. 
- pt.size
- Point size for plotting. 
- cells.highlight
- A vector of cell names to highlight. 
- cols.highlight
- Color used to highlight the cells. 
- shape.highlight
- Shape of the cell to highlight. See scattergl-marker-symbol 
- sizes.highlight
- Size of highlighted cells. 
- width
- Width in pixels, defaults to automatic sizing. 
- height
- Height in pixels, defaults to automatic sizing. 
- save
- The name of the file to save the plot to. Must end in ".html". 
- force
- Whether to force drawing regardless of the number of features greater than 100. 
Examples
data("pancreas_sub")
pancreas_sub <- Standard_SCP(pancreas_sub)
#> [2025-09-08 16:12:24.945951] Start Standard_SCP
#> [2025-09-08 16:12:24.946175] Checking srtList... ...
#> Warning: Failed to check Seurat version compatibility: 'list' object cannot be coerced to type 'double'
#> Warning: The following arguments are not used: drop
#> Warning: The following arguments are not used: drop
#> Error in as.vector(data): no method for coercing this S4 class to a vector
FeatureDimPlot3D(pancreas_sub, features = c("Ghrl", "Ins1", "Gcg", "Ins2"), reduction = "StandardpcaUMAP3D")
#> Error in col2hex(cols.highlight): could not find function "col2hex"
FeatureDimPlot3D(pancreas_sub, features = c("StandardPC_1", "StandardPC_2"), reduction = "StandardpcaUMAP3D")
#> Error in col2hex(cols.highlight): could not find function "col2hex"