A Grammar of Graphics Implementation of Biplots
Overview
A 'ggplot2' based implementation of biplots, giving a representation of a dataset in a two dimensional space accounting for the greatest variance, together with variable vectors showing how the data variables relate to this space. It provides a replacement for stats::biplot(), but with many enhancements to control the analysis and graphical display. It implements biplot and scree plot methods which can be used with the results of prcomp(), princomp(), FactoMineR::PCA(), ade4::dudi.pca() or MASS::lda() and can be customized using 'ggplot2' techniques.
- Now Depends R (>= 4.1.0) to handle
|> - Added
lda()objects to those handled byreflect() - Illustrate reflection in ggbiplot examples
- Added
ggvector(), exported, to draw labeled vectors from a common origin usingggarrow::geom_arrow_segment().ggbiplot()now uses this internally to draw variable vectors and their labels, replacing the previousgeom_segment()+grid::arrow()code.ggarrowis now a package dependency (Imports). ggbiplot()gains avarname.gapargument to pull variable-vector arrowheads back (in mm) from their true endpoint, e.g. to keep them clear of the correlation circle or of crowded labels. Exposed onggvector()asgap.ggvector()'s (and soggbiplot()'s) default arrowlinewidthis now0.9, down from1.4(which matched the shaft width of the oldgrid::arrow()-based rendering).ggarrow's defaultarrow_head_wings()ornament reads visually heavier than the old plain triangular arrowhead at the same linewidth, so1.4now looks noticeably thicker than the pre-ggarrowarrows did;0.9was chosen to look comparable. Usevector.args = list(linewidth = 1.4)to get the old shaft weight back.
Show all changes in 0.6.5Hide the rest of the changes in 0.6.5
ggbiplot()gains avector.argsargument: a named list forwarded to theggvector()call that draws the variable-vector arrows, e.g.list(arrow_head = ggarrow::arrow_head_line())for a different arrowhead shape. Anything not matched by aggvector()argument passes on toggarrow::geom_arrow_segment()(justify,force_arrow,sep,distort, ...).
From NEWS.md in the release
Install
Health
- OK13 OK2026-09-19
- NOTE3 OK, 11 NOTE2026-03-10
Documentation
- Help pages
- 7
- Examples that run
- 100%7 run in a plain check
- Exported functions with examples
- 100%
- Documented parameters
- 97%
- Return-value docs
- 100%
- Help pages citing references
- 43%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 545
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Releases over time
Issues over time
Commits over time
6 development-tooling and community-health practices detected across 3 families in the upstream repository
Checks run against github.com/friendly/ggbiplot on 2026-10-11.
GitHub Pages site last deployed 2026-09-10
pkgdown site last built 2026-08-04, before release 0.6.5 (2026-09-07)
This repository shows signs of AI coding tools.
- Claude Codefirst seen on or before 2026-09-04Named in .Rbuildignore: .claudeCommits: some crediting it in the message, count not recorded
Dependencies
Installing ggbiplot adds 19 packages (8 with compiled code, 14 MB of source tarballs). Heaviest: ggplot2 6.0 MB, isoband 1.5 MB, farver 1.2 MB.
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 0.6.5Latest
- RR 4.6.0 released · 2026-04-24
- RR 4.5.0 released · 2025-04-11
- RR 4.4.0 released · 2024-04-24
- 0.6.2
- 0.6.12023-12-17
- RR 4.3.0 released · 2023-04-21
Package metadata
- First published
- 2023-12-17
- Total releases
- 3 / 3 yrs
- License
- GPL-2 OSI
- Minimum R
- ≥ 4.1.0
- Bundled data
- 7.0 KB / 2 files
- Download size
- 245 KB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("ggbiplot")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-19, which the citation names so these numbers can be found later. More on citing and the projects behind them.