PlotDims: Plots 2D embedding

View source: R/swne_plotting.R

PlotDimsR Documentation

Plots 2D embedding

Description

Plots 2D embedding

Usage

PlotDims(
  dim.scores,
  sample.groups,
  x.lab = "tsne1",
  y.lab = "tsne2",
  main.title = NULL,
  pt.size = 1,
  font.size = 12,
  alpha.plot = 1,
  do.label = T,
  label.size = 4,
  show.legend = T,
  show.axes = T,
  seed = NULL,
  colors.use = NULL,
  use.brewer.pal = F
)

Arguments

dim.scores

2D embedding coordinates. Must be N x 2 samples

sample.groups

Factor defining sample groups

x.lab

X axis label

y.lab

Y axis label

main.title

Main plot title

pt.size

Sample point size

font.size

Font size for axis labels

alpha.plot

Data point transparency

do.label

Label the sample groups

label.size

Label font size

show.legend

If sample groups defined, show legend

show.axes

Plot x and y axes

seed

Seed for sample group color reproducibility

colors.use

Vector of hex colors for each sample group. Vector names must align with sample.groups

use.brewer.pal

Use RColorBrewer 'Paired' palette instead of default ggplot2 color wheel

Value

ggplot2 object with 2d plot


yanwu2014/swne documentation built on Aug. 5, 2023, 4:42 a.m.