ggbiplot: Draw 'biplot' using 'ggplot2'.

View source: R/plotlib.R

ggbiplotR Documentation

Draw biplot using ggplot2.

Description

Draw biplot using ggplot2.

Usage

ggbiplot(
  plot.data,
  loadings.data = NULL,
  colour = NULL,
  size = NULL,
  linetype = NULL,
  alpha = NULL,
  fill = NULL,
  shape = NULL,
  label = FALSE,
  label.label = "rownames",
  label.colour = colour,
  label.alpha = NULL,
  label.size = NULL,
  label.angle = NULL,
  label.family = NULL,
  label.fontface = NULL,
  label.lineheight = NULL,
  label.hjust = NULL,
  label.vjust = NULL,
  label.repel = FALSE,
  label.position = "identity",
  loadings = FALSE,
  loadings.arrow = grid::arrow(length = grid::unit(8, "points")),
  loadings.colour = "#FF0000",
  loadings.linewidth = 0.5,
  loadings.label = FALSE,
  loadings.label.label = "rownames",
  loadings.label.colour = "#FF0000",
  loadings.label.alpha = NULL,
  loadings.label.size = NULL,
  loadings.label.angle = NULL,
  loadings.label.family = NULL,
  loadings.label.fontface = NULL,
  loadings.label.lineheight = NULL,
  loadings.label.hjust = NULL,
  loadings.label.vjust = NULL,
  loadings.label.repel = FALSE,
  label.show.legend = NA,
  frame = FALSE,
  frame.type = NULL,
  frame.colour = colour,
  frame.level = 0.95,
  frame.alpha = 0.2,
  xlim = c(NA, NA),
  ylim = c(NA, NA),
  log = "",
  main = NULL,
  xlab = NULL,
  ylab = NULL,
  asp = NULL,
  ...
)

Arguments

plot.data

data.frame

loadings.data

data.frame

colour

colour

size

size

linetype

line type

alpha

alpha

fill

fill

shape

shape

label

Logical value whether to display data labels

label.label

Column name used for label text

label.colour

Colour for text labels

label.alpha

Alpha for text labels

label.size

Size for text labels

label.angle

Angle for text labels

label.family

Font family for text labels

label.fontface

Fontface for text labels

label.lineheight

Lineheight for text labels

label.hjust

Horizontal adjustment for text labels

label.vjust

Vertical adjustment for text labels

label.repel

Logical flag indicating whether to use ggrepel, enabling this may take some time for plotting

label.position

Character or a position function

loadings

Logical value whether to display loadings arrows

loadings.arrow

An arrow definition

loadings.colour

Point colour for data

loadings.linewidth

Segment linewidth for loadings

loadings.label

Logical value whether to display loadings labels

loadings.label.label

Column name used for loadings text labels

loadings.label.colour

Colour for loadings text labels

loadings.label.alpha

Alpha for loadings text labels

loadings.label.size

Size for loadings text labels

loadings.label.angle

Angle for loadings text labels

loadings.label.family

Font family for loadings text labels

loadings.label.fontface

Fontface for loadings text labels

loadings.label.lineheight

Lineheight for loadings text labels

loadings.label.hjust

Horizontal adjustment for loadings text labels

loadings.label.vjust

Vertical adjustment for loadings text labels

loadings.label.repel

Logical flag indicating whether to use ggrepel automatically

label.show.legend

Logical value indicating whether to show the legend of text labels

frame

Logical value whether to draw outliner convex / ellipse

frame.type

Character specifying frame type. 'convex' or types supporeted by ggplot2::stat_ellipse can be used.

frame.colour

Colour for frame

frame.level

Passed for ggplot2::stat_ellipse 's level. Ignored in 'convex'.

frame.alpha

Alpha for frame

xlim

limits for x axis

ylim

limits for y axis

log

which variables to log transform ("x", "y", or "xy")

main

character vector or expression for plot title

xlab

character vector or expression for x axis label

ylab

character vector or expression for y axis label

asp

the y/x aspect ratio

...

other arguments passed to methods

Value

ggplot


ggfortify documentation built on May 29, 2024, 7:19 a.m.