Miscellaneous Functions for "Grid" Graphics

Provides a number of user-level functions to work with "grid" graphics, notably to arrange multiple grid-based plots on a page, and draw tables.

Provides a number of user-level functions to work with "grid" graphics, notably to arrange multiple grid-based plots on a page, and draw tables. Earlier versions of the package contained more experimental graphical objects (grobs), that have now been removed.

See the gridExtra wiki for additional information, answers to Frequently Asked Questions, and the latest vignettes.


gridExtra 2.3.0 (2017-09-01)

Misc. cleanup for CRAN release

  • renamed cbind/rbind functions copied from gtable to cbind_gtable and rbind_gtable to avoid issues with generic method (different signature)
  • more consistency in gtable-related functions

gridExtra 2.2.0 (2016-02-27)


  • added padding argument to table themes
  • simplified a few theme arguments


  • recycling logic was flawed for aesthetics in table cells

gridExtra 2.1.0 (2015-07-27)


  • expanded vignettes
  • wiki page features a FAQ section


  • added join function from gtable (with fix)
  • global size and font parameters more accessible in themes
  • added str.gtable method


  • str.default was causing issues with gtables

gridExtra 2.0.0 (2015-07-11)

  • removed experimental grobs and functions not widely used (they can be found at https://github.com/baptiste/gridextra if needed)

  • arrangeGrob/grid.arrange is now based on gtable

  • tableGrob/grid.table is now based on gtable

gridExtra 1.0.0 (2014-10-05)


  • several buggy functions removed

gridExtra 0.9.1 (2012-08-09)


  • small compatibility issue of arrangeGrob with new class of ggplot2

gridExtra 0.9 (2012-01-06)


  • dependencies in examples, imports and exports


  • multipage output and ggsave support for grid.arrange

gridExtra 0.8.5 (2011-10-26)


  • removed LazyLoad, deprecated in R>=2.14


  • stextGrob text with a background

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.


2.3 by Baptiste Auguie, 3 years ago

Browse source code at https://github.com/cran/gridExtra

Authors: Baptiste Auguie [aut, cre] , Anton Antonov [ctb]

Documentation:   PDF Manual  

GPL (>= 2) license

Imports gtable, grid, grDevices, graphics, utils

Suggests ggplot2, egg, lattice, knitr, testthat

Imported by AFM, APIS, BGPhazard, BNPdensity, BNSP, BSL, BTSPAS, BasketballAnalyzeR, BayesFM, BioPET, BioPETsurv, BoutrosLab.plotting.general, C443, CAISEr, CARBayesST, CensMFM, ChaosGame, CommT, DALEXtra, DSAIDE, DSAIRM, DataExplorer, DecisionAnalysis, DendroSync, ENMTools, EmpiricalCalibration, EpiEstim, EvaluateCore, EventDetectR, Fgmutils, ForecastTB, GADMTools, GET, GWASinspector, GmAMisc, Hmisc, IFC, IntClust, LBSPR, MHMM, MRFcov, NMAoutlier, NetworkChange, NeuralSens, OpenLand, PAsso, PGRdup, PLMIX, PLNmodels, Phxnlme, PhyInformR, Plasmidprofiler, PosteriorBootstrap, QuantumClone, RAM, RDS, RSCAT, RSPS, RaSEn, RobStatTM, Rprofet, Rsmlx, SDLfilter, SHELF, SLEMI, SVMMaj, SWMPr, ShinyItemAnalysis, SmartEDA, StempCens, SubgrPlots, Superpower, TELP, TPD, TSsmoothing, TVMM, TriMatch, UniprotR, UpSetR, WRTDStidal, WVPlots, Xplortext, YRmisc, aMNLFA, abstractr, accSDA, afmToolkit, analyzer, auditor, baggr, bamdit, banter, basket, behaviorchange, blorr, brainGraph, brinton, bsam, bsamGP, carat, caretEnsemble, cellWise, choroplethr, classifierplots, cobalt, cocoreg, colorpatch, condformat, confoundr, coxed, cprobit, crmPack, customLayout, cutpointr, darksky, dataMaid, deaR, dendroTools, densityClust, descriptr, detectRUNS, diagis, did, dlookr, dsa, dynsim, easyalluvial, ebirdst, ecd, effectFusion, emdi, episensr, epos, explore, fSRM, fastqcr, fastshap, finalfit, findviews, fingerPro, fishualize, fmriqa, forestmangr, funModeling, gameofthrones, gdimap, geofacet, geomerge, getmstatistic, ggdemetra, ggfortify, ggguitar, ggpmisc, ggpubr, ggquickeda, ggstar, ggtern, glancedata, glmaag, gluvarpro, gprofiler2, granovaGG, grobblR, gscaLCA, harrypotter, hdnom, hpiR, iCellR, iNZightTS, iarm, iml, imsig, ingredients, interflex, interplot, irtplay, jarbes, joineRmeta, jskm, kgschart, lcc, lemon, likert, lindia, lmms, loewesadditivity, loon, loon.ggplot, lpirfs, lsbclust, malariaAtlas, manhplot, mcStats, meaRtools, metaplot, metaplotr, metaviz, mgcViz, microsamplingDesign, miscset, missingHE, model4you, modelplotr, morse, mosaic, myTAI, ncappc, networktools, neuromplex, nima, nlirms, nmathresh, nortsTest, olsrr, otvPlots, pacotest, panelView, patPRO, patternplot, pdp, pedquant, permubiome, phase1PRMD, phenofit, phyr, plothelper, pmxTools, pointRes, prcbench, precrec, qdap, qgcomp, qsort, quokar, r2glmm, rabhit, rainette, rangeMapper, refund.shiny, registr, remote, reproducer, rfPermute, riskCommunicator, rmcfs, rnoaa, rosetta, rotations, rrepast, rstan, rties, ruv, santaR, scorecard, sctransform, sglg, shinyKGode, shinystan, simPH, simrel, smartR, snht, soc.ca, sparsereg, speaq, spikeSlabGAM, spotGUI, spsur, statVisual, statgenSTA, statsr, stpp, strvalidator, sure, survMisc, survivalAnalysis, survminer, tRophicPosition, tactile, tidyMicro, tigger, trackeR, trinROC, ubiquity, ufs, uplifteval, userfriendlyscience, utile.visuals, varian, vdg, vip, viridis, waffle, yorkr.

Depended on by ACSNMineR, CA3variants, CAvariants, ESGtoolkit, GOplot, HH, MCAvariants, MinEDfind, NIRStat, PPtreeViz, ProbBayes, RATest, climwin, egg, flowDiv, metacart, nonmem2R, primerTree, rorutadis, spc4sts, tcR.

Suggested by BAMBI, BayesSenMC, CAST, CircSpaceTime, DClusterm, DLMtool, EFDR, FField, GSODR, HistData, IncDTW, KSD, LSAmitR, LocalControl, MIMSunit, MachineShop, OutliersO3, PPforest, ParamHelpers, PerformanceAnalytics, PopED, PupilPre, RStoolbox, RTransferEntropy, RcmdrPlugin.MA, RxODE, SCGLR, SHAPforxgboost, SemNeT, Sofi, StatRank, VWPre, adept, aimPlot, autoimage, bayesplot, beadplexr, bomrang, braidReports, breathtestcore, brickr, bujar, cate, celltrackR, changepoint.mv, compboost, convergEU, copula, countfitteR, ctsem, ddpcr, detrendr, disclapmix, distreg.vis, dotwhisker, dtwSat, eRTG3D, eechidna, eesim, eikosograms, ensr, evolqg, exact2x2, exuber, fgeo.plot, fpp2, frailtyEM, frailtySurv, funData, futureheatwaves, gMOIP, gbm, ggQC, ggalt, ggbeeswarm, ggmcmc, ggmosaic, ggrepel, ggsci, grapherator, gsDesign, hbbr, hhh4contacts, hrbrthemes, httk, hydrolinks, hyfo, iNEXT, ifaTools, intkrige, isocat, ivmte, jcolors, ltbayes, mcMST, medicalrisk, metR, mlrMBO, mlt.docreg, mlxR, mpMap2, mutSignatures, nandb, naniar, nlmixr, npregfast, patchwork, planar, pmc, portfolioBacktest, powerlmm, prevtoinc, raptr, rasterdiv, rattle, regressoR, retrodesign, rpf, rreg, rstanarm, see, sgd, simstudy, sjPlot, soilDB, spind, spup, stormwindmodel, surveillance, synoptReg, tabr, texmex, trackr, tram, treefit, tvgeom, vivo, vortexR, walker, xgxr, xpose, xspliner.

See at CRAN