Skip to contents

The function plot_scatter is used to draw a scatter plot.

Usage

plot_scatter(
  position,
  labels,
  label_name,
  axis_names = c("tSNE1", "tSNE2"),
  cols = NULL,
  no_guides = FALSE,
  do_density = FALSE,
  no_axis_name = FALSE,
  point_size = 2,
  point_alpha = 1,
  nrow.legend = NULL,
  legend.position = "bottom",
  no_axis = FALSE,
  ...
)

Arguments

position

A two columns matrix or data.fram, provides the coordinates information.

labels

A vector provides the label information.

label_name

A string provides the name of labels.

axis_names

Axis names.

cols

A vector determine the colors used in the plot.

no_guides

A indicator of whether remove the legend. FALSE by default.

do_density

A indicator of whether plot the density. FALSE by default.

no_axis_name

A indicator of whether remove axis names. FALSE by default.

point_size

The point size of scatter plot. 2 by default.

point_alpha

The transparency of scatter plot. 1 by default.

nrow.legend

An integer specify row number in legend.

legend.position

The position of legend. "bottom" by default.

no_axis

A indicator of whether remove axis labels and names.

...

Arguments passed to other methods.

Value

Returns a scatter plot.

Examples

data(iSCMEBObj_toy)
#> Warning: data set 'iSCMEBObj_toy' not found
library(Seurat)
position <- iSCMEBObj_toy@posList[[1]]
labels <- idents(iSCMEBObj_toy)[[1]]
p1 <- plot_scatter(position, labels, "clusters")