Skip to content

ggpubr

'ggplot2' Based Publication Ready Plots

v0.6.3 · Feb 24, 2026 · GPL (>= 2)

Description

The 'ggplot2' package is excellent and flexible for elegant data visualization in R. However the default generated plots requires some formatting before we can send them for publication. Furthermore, to customize a 'ggplot', the syntax is opaque and this raises the level of difficulty for researchers with no advanced R programming skills. 'ggpubr' provides some easy-to-use functions for creating and customizing 'ggplot2'- based publication ready plots.

Downloads

CRAN

232.9K

Last 30 days

223rd

830.6K

Last 90 days

3M

Last year

Trend: -22.8% (30d vs prior 30d)

r2u CRAN

1.2K

Last 30 days

3.4K

Last 90 days

15.7K

Last year

Trend: +37.2% (30d vs prior 30d)

autoCRAN

1

Last 7 days

19

Last 30 days

0

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

conda-forge CRAN

7K

Last 30 days

21.6K

Last 90 days

73.4K

Last year

Trend: -3.1% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
ERROR r-devel-linux-x86_64-debian-gcc

examples

Running massageExamples to create ‘ggpubr-Ex.R’ failed
Error in file(out, "wt") : cannot open the connection
Calls: <Anonymous> -> Rd2ex -> file
In addition: Warning message:
In file(out, "wt") :
  cannot open file '/tmp/RtmpGY670j/file241b7040e26d49/ggviolin.R': No space left on device
Execution halted
 NONE
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 3, 2026
ERROR 11 OK · 0 NOTE · 0 WARNING · 2 ERROR · 0 FAILURE May 25, 2026
ERROR r-devel-linux-x86_64-debian-gcc

tests

Running ‘testthat.R’ [27s/44s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggpubr)
  Loading required package: ggplot2
  > 
  > test_check("ggpubr")
  Saving _problems/test-compare_means-39.R
  S
...[truncated]...
"Wilcoxon, p = 0.0043", "Wilcoxon, p = 0.0038")` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  Observed label = Wilcoxon, p = 0.0035
  
  [ FAIL 2 | WARN 3 | SKIP 0 | PASS 243 ]
  Error:
  ! Test failures.
  Execution halted
ERROR r-devel-linux-x86_64-fedora-gcc

tests

Running ‘testthat.R’ [64s/161s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(ggpubr)
  Loading required package: ggplot2
  > 
  > test_check("ggpubr")
  Saving _problems/test-compare_means-39.R
  
...[truncated]...
"Wilcoxon, p = 0.0043", "Wilcoxon, p = 0.0038")` to be TRUE.
  Differences:
  `actual`:   FALSE
  `expected`: TRUE 
  
  Observed label = Wilcoxon, p = 0.0035
  
  [ FAIL 2 | WARN 3 | SKIP 0 | PASS 243 ]
  Error:
  ! Test failures.
  Execution halted
OK 14 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026

Line coverage

Expression

Tests / Examples

Functions

331 117 exported

Complexity

4.1 avg / 33 max

Call network

331 nodes / 523 edges

Test coverage has not been measured for this package yet; nodes fall back to a neutral fill.

Loading call graph…

Lowest coverage

Per-function coverage is not measured for this package yet.

Code

Structure

Lines of code

27,083

Files

221

Compiled share

0%

Has compiled src

No

Language breakdown

R 15,075 (55.7%)Tests 1,782 (6.6%)Docs 10,226 (37.8%)

API

Exported functions

122

Internal functions

209

Recent export changes

v0.6.0+1 ggadjust_pvalue
v0.5.0+12 as_npc, as_npcx, as_npcy +9 more

Testing & CI

Has tests

Yes

Test-to-code ratio

0.12

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

22.1%

\dontrun example ratio

3.8%

Roxygen coverage

99.2%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

Unsafe pattern score

0

Dep constraint coverage

36.8%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

4.1.0

System requirements

C++ standard

License

GPL (>= 2)

License flags

SPDX valid, OSI approved

History

Versions

23

First release

2016-07-20

Latest release

2026-02-24

Avg cadence

84 days

Cold removal rate

Dep drift

14

LOC over versions

v0.1.0: 5,882 LOCv0.1.1: 6,511 LOCv0.1.2: 6,779 LOCv0.1.3: 12,748 LOCv0.1.4: 14,347 LOCv0.1.5: 14,490 LOCv0.1.6: 15,793 LOCv0.1.7: 16,098 LOCv0.1.8: 16,860 LOCv0.1.9: 16,883 LOCv0.2: 16,901 LOCv0.2.1: 17,082 LOCv0.2.2: 17,676 LOCv0.2.3: 18,020 LOCv0.2.4: 18,046 LOCv0.2.5: 18,063 LOCv0.3.0: 19,443 LOCv0.4.0: 20,718 LOCv0.5.0: 25,483 LOCv0.6.0: 26,176 LOCv0.6.1: 26,940 LOCv0.6.2: 26,942 LOCv0.6.3: 27,083 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (317)

imports

APCI APCtools AdverseEvents AnanseSeurat AnnoProbe AntsNet AssumpSure BAwiR BCFM BNPmix BRCore BREADR BSTFA BayesChange BayesMultiMode BayesianPlatformDesignTimeTrend BinMat BioM2 BioThermR BiostatsUHNplus BoneDensityMapping CLRtools CRMetrics ClusROC CompAREdesign CovidMutations Coxmos DFD DamageDetective DeductiveR EEAaq EGAnet ENMTools EvalTest FRK FluxSeparator GABB GCEstim GNAR GimmeMyPlot HHBayes HYPEtools HanStat IDEATools INetTool IRon ImFoR JWileymisc LTCDM LeadSense LorMe MAPCtools MERO MF.beta4 MSPRT MSigSeg NetSurvProx OSLdecomposition OenoKPM OmicFlow PDXpower PRECAST PUMP PopComm Qploidy QuadratiK QurvE RCTrep RNAmf RegrCoeffsExplorer RelativeDistClust RiskMap SEIRfansy SHAPforxgboost SWTools ShellChron Silhouette SouthParkRshiny SqueakR TCIU TestGardener TransProR UCSCXenaShiny UNCOVER UniprotR VALERIE WINS Xplortext adestr agriutilities asmbPLS autoslider.core bSi baker bartXViz bayMDS baytaAAR bdl bdsm bmstdr calibmsm coda4microbiome conformalInference.fd convergEU corx crctStepdown crosslag csa csmpv cvCovEst dPCP dae ddtlcm dfoliatR diversityForest dpGMM drugsens dtComb easynem ecocbo edar entropart epts esmtools exeval explainer fChange factoextra fastai finnsurveytext geocausal gfoRmula ggInterval ggquickeda giniCI gkwreg glmmSeq grapesAgri1 hdcuremodels hdpGLM heiscore hipecR iCellR iNEXT.4steps iSTAY iglu insane integrity jollofR jskm jsmodule knfi kollaR lehuynh lmap longreadvqs mappoly mc2d mda.biber meconetcomp mecoturn metaviz miceRanger microbial missingHE mlspatial multid multilevelTools multipleOutcomes neonPlantEcology nlmixr2rpt ofpetrial omicsTools onemap pRecipe parafac4microbiome pbcc pctax popstudy predRupdate promotionImpact psc pseudoCure qPCRhelper rACMEMEEV rKOMICS rPACI rSAFE reappraised reportRmd reservoirnet rfVarImpOOB riskCommunicator rmlnomogram rmsBMA rnmamod rrtable scITD scSpatialSIM sgdGMF shadowVIMP sievePH sigminer simET smplot2 spDBL surtvep symptomcheckR sysAgNPs tRigon tcgaViz tidyplots tipsae trawl trendtestR ultrapolaRplot vDiveR vaccine vannstats vecmatch vici viewpoly vmeasur volcano3D

Dependency Network

Dependencies Reverse dependencies ggplot2 ggrepel ggsci tidyr (>= 1.3.0) purrr dplyr cowplot ggsignif scales gridExtra glue polynom rlang rstatix (>= 0.7.2) tibble +1 more dependencies LoTTA SCOUTer SKFCPD clustEff survminer APCI APCtools AdverseEvents AnanseSeurat AnnoProbe AntsNet AssumpSure BAwiR BCFM BNPmix +302 more reverse deps ggpubr

Version History

24 tracked
new 0.6.3 Mar 10, 2026
updated 0.6.3 ← 0.6.2 diff Feb 23, 2026
updated 0.6.2 ← 0.6.1 diff Oct 16, 2025
updated 0.6.1 ← 0.6.0 diff Jun 26, 2025
updated 0.6.0 ← 0.5.0 diff Feb 9, 2023
updated 0.5.0 ← 0.4.0 diff Nov 15, 2022
updated 0.4.0 ← 0.3.0 diff Jun 26, 2020
updated 0.3.0 ← 0.2.5 diff May 3, 2020
updated 0.2.5 ← 0.2.4 diff Feb 12, 2020
updated 0.2.4 ← 0.2.3 diff Nov 13, 2019
updated 0.2.3 ← 0.2.2 diff Sep 3, 2019
updated 0.2.2 ← 0.2.1 diff Aug 6, 2019
updated 0.2.1 ← 0.2 diff Jun 22, 2019
updated 0.2 ← 0.1.9 diff Nov 14, 2018
updated 0.1.9 ← 0.1.8 diff Nov 10, 2018