Skip to content

ggcorrplot

0.3.0Package record

Visualization of a Correlation Matrix using 'ggplot2'

15packages dependsuggested by 7
345.2Kdownloads / year
97.6%test coverage
13/13flavors OK

Overview

About

The 'ggcorrplot' package can be used to visualize easily a correlation matrix using 'ggplot2'. It provides a solution for reordering the correlation matrix and displays the significance level on the plot. It also includes a function for computing a matrix of correlation p-values.

Changes in 0.3.0

New features

  • New argument cell.grid to draw a light rectangle around every cell (behind the glyphs) and drop the through-center gridlines, so the sized glyphs (method = "circle" or scale.square = TRUE) sit inside boxed cells -- the corrplot boxed-cell look: ggcorrplot(corr, method = "circle", cell.grid = TRUE). The cell border color is set with the companion argument cell.grid.col (default "grey90"). Defaults to FALSE; has no effect on a full-tile square heatmap, whose tiles already carry an outline.color border.
  • New argument scale.square to size the squares by the absolute correlation when method = "square": ggcorrplot(corr, scale.square = TRUE) scales each square (larger = stronger correlation) on top of the fill color, the classic corrplot size-scaled square look. Defaults to FALSE (constant full-cell squares, unchanged); has no effect for method = "circle" (circles are always sized).
Show all changes in 0.3.0Hide the rest of the changes in 0.3.0
  • New argument preset for publication-grade output in one token: ggcorrplot(corr, preset = "publication") sets white cell outlines and the colorblind-safe "RdBu" palette. It only fills arguments you did not supply, so anything you pass explicitly (e.g. outline.color, colors, palette) overrides the preset. Defaults to NULL (no preset), leaving existing calls unchanged.
  • New argument palette to pick a built-in colorblind-safe diverging palette for the fill gradient: ggcorrplot(corr, palette = "RdBu") (or "PuOr"). Each is an 11-stop ramp with white at zero and the usual cool = negative / warm = positive polarity, so it is a one-word alternative to spelling out colors. Defaults to NULL (use colors), leaving existing calls unchanged.
  • New value insig = "stars" to mark the significant cells with significance stars (***/**/* for p <= 0.001/0.01/0.05 -- fixed thresholds, not sig.level) instead of crossing out the insignificant ones. Works without lab, so ggcorrplot(corr, p.mat = p.mat, insig = "stars") is a standalone significance map. The default insig = "pch" is unchanged.
  • New arguments lower.method and upper.method for a mixed layout: a different glyph per triangle, e.g. the coefficients as numbers in the lower triangle, circles in the upper, and the variable names on the diagonal (ggcorrplot(corr, lower.method = "number", upper.method = "circle")). Each accepts "square", "circle" or "number"; both default to NULL, leaving the single-method output unchanged (#85). Requested by @Breeze-Hu.
  • New argument hc.rect to draw rectangles around the clusters of a hierarchically-ordered correlogram: ggcorrplot(corr, hc.order = TRUE, hc.rect = 3) frames the 3 clusters obtained by cutting the tree. Defaults to NULL (no rectangles). The rectangle outline color is set with the companion argument hc.rect.col (default "gray30", e.g. hc.rect.col = "white").

Main changes

  • The plot axis is now always drawn in the matrix (row/column) order. This fixes a bug where hc.order = TRUE was silently ignored for correlation matrices with numeric-looking variable names (e.g. "1", "2", ...): reshape2::melt type-converted such names to a continuous axis sorted by value, discarding the clustering order (#37). As a consequence, the as.is argument no longer affects the plot (it is kept only for backward compatibility) -- a call using as.is = TRUE, which previously produced an alphabetically-ordered axis, now follows the matrix order like every other call. Reported by @cabaez (#37).
  • show.diag = FALSE on a non-square matrix no longer blanks the wrong cells. The diagonal has no positional meaning for an m x n matrix, yet the removal wiped min(m, n) cells along the leading diagonal; it now removes only the genuine self-pairs (a row and column naming the same variable), leaving a matrix with disjoint row and column variables untouched. Square matrices, and non-square matrices without dimnames, are unaffected. Follows up the non-square support requested by @mt1022 (#5) and @qalid7 (#10).

Minor changes

  • Added an introductory vignette, vignette("ggcorrplot"), walking through the package end to end: the inputs, glyphs and layouts, clustering, coefficient labels, significance styles, and theming.
  • Added a second vignette, vignette("publication-ready-correlation-plots"), a gallery of finished publication-ready correlogram recipes (clustered, triangle, significance, circle, colorblind palette, edgeless heatmap, rectangular predictor-by-outcome matrix, and full ggplot2 polish).
  • Internal refactor: the data-preparation pipeline and the glyph-layer construction are now factored into internal helpers, with no change to the output of any existing call. This is groundwork for forthcoming per-triangle layout options.
  • The help page and the README now link to the Datanovia correlation tutorials for worked examples of the plot and of the p-value matrix.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 5.8 min · r-oldrel-macos-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK13 OK2026-07-11
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 0.3.0
READMEYes · 519 wordsVignettesYes · 2 · dynamicNEWSYes · 100% structured · mentions 0.3.0Citation fileYes · computed when R runs itWebsiteYes
Help pages
1
Examples that run
100%1 run in a plain check
Exported functions with examples
100%
Documented parameters
76%
Return-value docs
100%
Help pages citing references
0%

Downloads

345.2K
CRAN downloads in the past year
Rank #728 · ~946/day · ~28.8K/mo
Daily download trend is not available in this view yet.
22.2K30 days
70.4K90 days
345.2K1 year
Compare downloads with other packages →
Also on2.2K r2u7 autocran9.4K conda_forge

Repository

197Stars
38Forks
1Open issues
0Open PRs
6Releases
167Commits
5Commit identities
167 commits · Last activity 2026-07-28 · 0% stars, 30d · Default branch at 0.3.0.9000, ahead of CRAN 0.3.0 (checked 2026-10-11)
Responsiveness
How these are sampled
PRs merged (all time)
87%
Median days to close, 50 most recently updated closed issues
915
Median days to close, 50 most recently updated closed PRs
0

Stars over time

2025-09-15 · 1882026-09-10 · 197
PracticesBeta

9 development-tooling and community-health practices detected across 6 families in the upstream repository

Checks run against github.com/kassambara/ggcorrplot on 2026-10-11.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (2)
README.Rmdpkgdown
Reproducibility and dev environment (1)
Makefile
CRAN release process (2)
cran-comments.mdCRAN-SUBMISSION
Show all practicesHide 2 practices
Lint, format, editor (1)
RStudio project
Git structural (1)
.gitattributes
How this is detected·Detection ruleset v3 (2026-09-26)

Dependencies

Declared dependencies
7 external dependencies (excludes base and recommended)

Installing ggcorrplot adds 23 packages (12 with compiled code, 27 MB of source tarballs). Heaviest: stringi 11 MB, ggplot2 6.0 MB, Rcpp 1.8 MB.

Depends (2)
R >= 3.3ggplot2
Imports (3)
grDevicesreshape2stats
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
15direct
4indirect
Imports 15
Suggested by 7
Show all 22 packagesHide all 22 packages
Depends, Imports or LinkingTo, most downloaded first
Suggests, most downloaded first

People & History

People (2)
Author, Maintainer since 0.1.1 (2016)
Contributor · added in 0.1.4
@patilindrajeets
Releases (7)

Pick two releases to compare their code metrics.

  • 0.3.0Latest
    record
    2026-07-24 · current release · diff ↗
  • 0.2.0
    record
    2026-07-08 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • 0.1.4.1
    record
    2023-09-05 · diff ↗
  • R
    R 4.3.0 released · 2023-04-21
  • 0.1.4
    record
    2022-09-27 · diff ↗
  • R
    R 4.2.0 released · 2022-04-22
  • R
    R 4.1.0 released · 2021-05-18
  • R
    R 4.0.0 released · 2020-04-24
  • 0.1.3
    record
    2019-05-19 · diff ↗
  • R
    R 3.6.0 released · 2019-04-26
  • 0.1.2
    record
    2018-09-11 · diff ↗
  • R
    R 3.5.0 released · 2018-04-23
  • R
    R 3.4.0 released · 2017-04-21
Show 3 earlier eventsHide 3 earlier events
  • R
    R 3.3.0 released · 2016-05-03
  • 0.1.1
    record
    2016-01-12
  • R
    R 3.2.0 released · 2015-04-16

Package metadata

First published
2016-01-12
Total releases
7 / 10 yrs
License
GPL-2 OSI
Minimum R
≥ 3.3
Download size
3.4 MB

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("ggcorrplot")

The package provides a citation file that builds its entry when R runs it. Run citation() to see it.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for ggcorrplot version 0.3.0 [Data set]. HJJB, LLC. Data release v2026-10-18. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-18, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy