Visualize the specified item on the two-dimensional embeddings such as tSNE, UMAP and so on.

EmbedPlot(obj, item = "cluster", plotEmbeddings = "tSNE", ...)

# S3 method for SRTProject
EmbedPlot(
  obj,
  item = "cluster",
  plotEmbeddings = NULL,
  axis_names = NULL,
  cols = NULL,
  no_guides = FALSE,
  no_axis_name = FALSE,
  pt_size = 1,
  point_alpha = 1,
  nrow.legend = NULL,
  base_size = 10,
  border_col = "gray",
  legend.position = "bottom",
  no_axis = FALSE,
  do_density = FALSE
)

# S3 method for SpatialExperiment
EmbedPlot(
  spe,
  plotEmbeddings = NULL,
  colour_by = NULL,
  base_size = 15,
  legend.position = "right",
  add_border_box = FALSE,
  ...
)

Arguments

obj

a SRTProject object or SpatialExperiment object.

item

a string, the item used to mapped as colors.

plotEmbeddings

a string, the name of plotembeddings, sucha as tSNE and UMAP.

axis_names

a 2-dimensional string vector, the names of axis.

cols

a string vector, the selected colors.

no_guides

a logical value, whether add guides.

no_axis_name

a logical value, whether display the axis names.

pt_size

a positive real, the point size in plot.

point_alpha

a positive real between 0 and 1, the point transparency in plot.

nrow.legend

a positive number, the number of columns for legend.

base_size

a positive real, the baseline text size in plot.

border_col

a string, the color of border in plot.

legend.position

a string, the positive of legend.

no_axis

a logical value, whether display the axis.

do_density

a logical value, whether plot the density plot.

add_border_box

a logical value, whether add border box in plot.

Value

returns a ggplot object.

See also