A system for 'declaratively' creating graphics, based on "The Grammar of Graphics". You provide the data, tell 'ggplot2' how to map variables to aesthetics, what graphical primitives to use, and it takes care of the details.

Documentation

Manual: ggplot2.pdf
Vignettes:

Maintainer: Hadley Wickham <hadley at rstudio.com>

Author(s): Hadley Wickham*, Winston Chang*, RStudio*

Install package and any missing dependencies by running this line in your R console:

install.packages("ggplot2")

Depends R (>= 3.1)
Imports digest, grid, gtable(>=0.1.1), MASS, plyr(>=1.7.1), reshape2, scales(>=0.4.1), stats, tibble, lazyeval
Suggests covr, ggplot2movies, hexbin, Hmisc, lattice, mapproj, maps, maptools, mgcv, multcomp, nlme, testthat(>=0.11.0), quantreg, knitr, rpart, rmarkdown, svglite
Enhances sp
Linking to
Reverse
depends
ACSNMineR, afmToolkit, alakazam, AmpliconDuo, aoristic, apsimr, BatchMap, bayesDP, BCellMA, bde, benchmark, biomod2, bootnet, braidReports, brms, btergm, caret, CINOEDV, cjoint, classifierplots, climwin, clustrd, coefplot, conformal, corkscrew, cosinor2, cowplot, crmPack, Crossover, CRTgeeDR, cystiSim, dae, dataMaid, Deducer, DendroSync, DengueRT, DepthProc, dfexplore, dggridR, diffeR, difNLR, dMod, DoTC, dotwhisker, dslice, DTRlearn, dtwclust, dtwSat, dynOmics, dynr, earlywarnings, eeptools, eiCompare, EnsCat, EpiCurve, ESGtoolkit, EventStudy, factoextra, fbroc, fergm, fishmove, flippant, forecastHybrid, forestmodel, fpp2, freqparcoord, GADMTools, gapfill, gapmap, gcerisk, GenCAT, genomeplot, geomnet, geotoolsR, gettingtothebottom, ggalt, ggbeeswarm, ggCompNet, ggcorrplot, ggedit, ggforce, ggformula, ggfortify, ggghost, ggimage, ggiraph, ggjoy, ggmap, ggmcmc, ggmosaic, ggnetwork, ggparallel, ggpmisc, ggpolypath, ggpubr, ggquiver, ggraph, ggraptR, ggrepel, ggROC, ggseas, ggsn, ggspatial, ggswissmaps, ggtern, gMOIP, gofMC, GOplot, gpmap, granovaGG, gsDesign, GSE, gwdegree, Hmisc, HRM, hyperSpec, ICtest, idm, ifaTools, INLAutils, InSilicoVA, interplot, itan, JWileymisc, LambertW, learnstats, LexisPlotR, likeLTD, likert, listdtr, lmms, lsbclust, MCMC.OTU, MCMC.qpcr, mcprofile, MergeGUI, meteogRam, mhtboot, MissingDataGUI, MIXFIM, mixKernel, mixOmics, mlxR, mrfDepth, mudfold, multilevelPSA, MultiVarSel, mutSignatures, ncappc, NeatMap, nullabor, openVA, orgR, OriGen, OutbreakTools, overlapping, PairedData, pAnalysis, ParallelTree, PASenseWear, PASWR2, pauwels2014, PAWL, pcadapt, pcaPA, pcrcoal, PedCNV, pequod, perry, personalized, perspectev, PhaseType, phylosim, pid, pitchRx, pkggraph, PKgraph, PKreport, PlasmaMutationDetector, plotly, plotROC, pointRes, PortfolioEffectHFT, PPtreeViz, precintcon, prevR, PRISMA, profileR, ProgGUIinR, PSAboot, qqplotr, quadrupen, QualInt, quickpsy, radiant.data, RAM, randomizeR, RATest, RatingScaleReduction, RcmdrPlugin.KMggplot2, riskRegression, RJafroc, rms, RNAseqNet, robCompositions, robmed, robustHD, rorutadis, rotations, RpeakChrom, rrecsys, RSA, rstan, rtip, rwty, Rz, scatterpie, SciencesPo, season, SEERaBomb, selfea, sensiPhy, Seurat, sglr, shazam, simmer.plot, simmr, SmarterPoland, SMFI5, soc.ca, sparkTable, SparseFactorAnalysis, sparsereg, spatialClust, SPEI, sprm, statisticalModeling, SubgrpID, sugrrants, summariser, survminer, SWMPr, synthpop, TcGSA, tcR, tdr, TeachBayes, texmex, texmexseq, tigger, timeline, trackeR, TriMatch, TripleR, tspmeta, useful, varian, vdg, vrcp, VWPre, waffle, walkr, WRTDStidal, XGR, xkcd, Xplortext, zooaRch
Reverse
imports
ABHgenotypeR, acc, ACDm, adapr, AdaptGauss, adaptiveGPCA, adegenet, admixturegraph, advclust, AFM, ahnr, AID, aimPlot, AlignStat, alphahull, anchoredDistr, ANOM, antitrust, aop, ArchaeoPhases, aslib, asremlPlus, assignPOP, asVPC, atlantistools, autoimage, BACA, BacArena, BACCT, backShift, bamdit, bayesAB, BayesFM, bayesplot, BBEST, Bclim, bcrm, bdscale, bdvis, bea.R, BETS, bibliometrix, bigKRLS, BIGL, Biograph, bioinactivation, bioOED, BioPET, bioplots, BioStatR, blandr, blastula, blkbox, blockseg, blscrapeR, bmlm, bmmix, BNSP, bossMaps, BPEC, BrailleR, brainGraph, breakpoint, breathtestcore, bridger2, broman, brt, bsam, bsamGP, bssm, BTSPAS, bulletr, burnr, caffsim, CALF, capm, caretEnsemble, casebase, catenary, CausalImpact, Causata, cbar, cdom, cellWise, ChainLadder, ChannelAttributionApp, ChaosGame, ChocoLattes, choroplethr, choroplethrAdmin1, CINNA, ck37r, classify, classyfire, cleanEHR, clhs, clickstream, clifro, climbeR, ClimClass, ClusterR, clustMD, clustRcompaR, cmaesr, cobalt, cocoreg, cofeatureR, CollapsABEL, colormap, colorpatch, colorplaner, colourpicker, CommT, complmrob, confidence, ConfoundedMeta, Conigrave, cooccur, CopulaDTA, corrr, cosinor, CosmoPhotoz, countyfloods, countyweather, covafillr, covmat, cowbell, cplm, cpr, cricketr, crosstalk, cutoffR, cytometree, darch, darksky, dartR, DataExplorer, dcmr, ddpcr, DeLorean, dendextend, dendroExtra, DescribeDisplay, detzrcr, DFIT, Dforest, dfped, dfpk, dgo, diagis, DiallelAnalysisR, diceR, disco, diveRsity, DiversityOccupancy, dlstats, docxtools, drLumi, dslabs, dsm, DstarM, DTR, DVHmetrics, DynNom, dynsim, dynsurv, EasyHTMLReport, easyml, EcoGenetics, ecolottery, ecr, edarf, edeaR, edgar, edstan, eechidna, EEM, effectFusion, EffectLiteR, ega, egcm, EMAtools, emdi, emil, emojifont, EmpiricalCalibration, enpls, EnvStats, EpiDynamics, episensr, episheet, esmisc, evaluator, evolqg, Evomorph, evoper, explor, exploreR, exreport, extracat, eyetrackingR, ez, ezsim, factorMerger, FAOSTAT, fastqcr, fcm, fdq, fence, Fgmutils, FinCal, FindIt, findviews, FLightR, fontHind, fontMPlus, forecast, frailtyEM, frailtySurv, FREddyPro, FreqProf, FRK, fSRM, funModeling, futureheatwaves, fuzzyforest, G2Sd, gaiah, gastempt, GCalignR, GDINA, GeneralizedUmatrix, geneSLOPE, geofacet, GeomComb, GERGM, GerminaR, getmstatistic, gfcanalysis, gfer, GGally, ggChernoff, ggdendro, ggdmc, GGEBiplots, ggeffects, ggenealogy, ggExtra, ggfittext, ggguitar, gghalfnorm, ggiraphExtra, gglogo, ggloop, ggplotgui, ggpval, ggQC, ggRandomForests, ggsci, ggseqlogo, ggsignif, ggspectra, ggstance, ggThemeAssist, ggthemes, ghibli, gitter, GJRM, glycanr, gmum.r, gogamer, greport, gridsampler, growcurves, growfunctions, GSparO, gsynth, gtrendsR, GUIgems, gunsales, gWQS, harrietr, hBayesDM, HBP, hdm, hdnom, heatmaply, heemod, hexSticker, hierarchicalDS, hierarchicalSets, HighDimOut, HistDAWass, HLMdiag, HMP, HoRM, horserule, hrbrthemes, HTSSIP, hurricaneexposure, hybridModels, hyfo, IAPWS95, IAT, ibmdbR, IGM.MEA, iJRF, imageData, IMP, imputeTestbench, incidence, inctools, IncucyteDRC, iNEXT, iNextPD, Information, InformationValue, IntClust, IntegratedJM, IntegratedMRF, interflex, intsvy, ipft, IPtoCountry, iqspr, ITGM, ivmodel, iWISA, jcolors, jmv, joineRML, kdetrees, kgschart, kobe, KraljicMatrix, l1kdeconv, LANDD, lans2r, largeVis, LBSPR, ldatuning, ldhmm, learningCurve, lemon, lifelogr, lindia, linear.tools, llama, lmerTest, LocFDRPois, logisticPCA, LOGIT, lpdensity, lsl, lvplot, m2b, mafs, manhattanly, mapr, marmap, mau, MAVIS, mbgraphic, mcMST, Mcomp, mdpeer, mdsr, MEGENA, meltt, memapp, MendelianRandomization, merTools, metacoder, MetaComp, metagen, metaheur, MetaIntegrator, MetaLonDA, metaMix, metaplotr, metaviz, Methplot, mglR, microbenchmark, micromap, MiRAnorm, miscset, mistral, mixR, MixSIAR, mizer, mlmc, mlr, Mobilize, modeval, momentuHMM, Momocs, morse, mosaic, mousetrap, moveHMM, moveVis, mplot, mpoly, mrMLM, MRMR, MSCMT, MSGARCH, mtconnectR, mudata, multdyn, multiDimBio, MultiMeta, multipanelfigure, mvdalab, myTAI, nandb, naniar, neatmaps, netgen, NetworkChange, NetworkInference, networkreporting, NetworkRiskMeasures, networktools, NeuralNetTools, neuropsychology, NFP, nhstplot, nima, nlstimedist, NMF, noaastormevents, NORRRM, nparACT, NPflow, npregfast, oaPlots, oaxaca, obAnalytics, oddsratio, officer, olsrr, OmicsPLS, onewaytests, OpasnetUtils, openEBGM, OpenStreetMap, optiRum, orderedLasso, ordinalForest, osmplotr, P2C2M, pa, PAC, pacotest, paleofire, partialAR, partialCI, patPRO, patternplot, PCADSC, pcrsim, pdp, pems.utils, penaltyLearning, performanceEstimation, permubiome, PGRdup, Phxnlme, PhyInformR, phylopath, pifpaf, pinbasic, pipe.design, pirate, PKPDmisc, planar, Plasmidprofiler, platetools, plotluck, plotMElm, PlotPrjNetworks, plotrr, pltesim, pmc, pogit, polypoly, PopED, PopGenReport, poppr, popsom, POUMM, powerbydesign, prcbench, prcr, precrec, predictionInterval, predictmeans, PredictTestbench, PredPsych, PReMiuM, preprosim, preproviz, preText, pRF, primerTree, prism, pROC, processmapR, processmonitR, productplots, ProjectionBasedClustering, prophet, proportion, propr, proteomics, pscore, psychmeta, PTXQC, QCAtools, QCSimulator, qdap, qgraph, qicharts, qte, quanteda, QuantumClone, quickPlot, quickReg, qwraps2, r2glmm, radiant.basics, radiant.model, radiant.multivariate, rags2ridges, randomForestExplainer, randomUniformForest, rangeMapper, raptr, RBesT, rbison, RBMRB, rbokeh, rchess, RcmdrPlugin.FuzzyClust, rddensity, rddtools, rdiversity, RDS, readability, reda, refund, refund.shiny, reghelper, RegularizedSCA, ReinforcementLearning, repijson, replicationInterval, reproducer, rfigshare, rfisheries, RFmarkerDetector, rfPermute, rgbif, RGraphics, RImagePalette, rinat, rKIN, RmarineHeatWaves, rmcfs, rnoaa, RNRCS, rnrfa, robustlmm, rolypoly, rplos, RPPanalyzer, rprev, rpsftm, rrepast, rrpack, rrr, rSARP, RSDA, rsMove, rSPACE, RSSL, rstanarm, RStoolbox, rtimicropem, RtutoR, rvertnet, rWBclimate, ryouready, saeRobust, saeSim, SCGLR, scmamp, sdcMicro, SensMixed, SensusR, SentimentAnalysis, sentimentr, SeqFeatR, sgd, SHELF, ShinyItemAnalysis, shinystan, SIBER, sicegar, sidier, SimMultiCorrData, simPH, SixSigma, sjPlot, slackr, smoof, snht, snpEnrichment, soilcarbon, solarius, sorvi, SpaCCr, SpaDES, sparsediscrim, sparsevar, SpatialEpiApp, spcosa, speaq, specmine, spef, spikeSlabGAM, spind, spmoran, spongecake, sppmix, squid, ss3sim, stacomiR, starma, starmie, statar, statcheck, statebins, StatRank, stormwindmodel, strataG, StroupGLMM, structSSI, strvalidator, subspaceMOA, superheat, sure, survivALL, survMisc, SurvRank, survtmle, survutils, sValues, svdvis, swfscMisc, sysid, tadaatoolbox, tcgsaseq, teachingApps, TELP, tetraclasse, themetagenomics, thief, tidyquant, tidyverse, tigerstats, timelineR, timelineS, TippingPoint, toaster, TOSTER, TreatmentSelection, treeclim, treeDA, treemap, trelliscope, tRophicPosition, TSCS, tsiR, TSMining, TSS.RESTREND, tvm, tweet2r, ubeR, ukbtools, UpSetR, userfriendlyscience, valr, valuer, vanddraabe, VDAP, vdmR, VetResearchLMM, viridis, visdat, vmsbase, vortexR, voxel, vqtl, VRPM, wakefield, walker, walrus, waterfalls, Wats, windfarmGA, wppExplorer, wql, WVPlots, x.ent, xsp, xxIRT, yorkr, yuimaGUI, zebu, zFactor, zonator, zooaRchGUI, ztype
Reverse
suggests
abctools, abd, alfred, ameco, AmyloGram, archetypes, archivist, ARPobservation, ARTool, automap, BatchGetSymbols, bayesbio, bbmle, BCEA, bcp, benchmarkme, benchmarkmeData, benchr, bife, binom, biogas, biogram, BlandAltmanLeh, bodenmiller, BradleyTerryScalable, bridgedist, broom, brotli, BSDA, cate, cda, Census2016, checkmate, childsds, cholera, choroplethrMaps, chron, clusterfly, clusternomics, codingMatrices, codyn, coloc, congressbr, contoureR, countytimezones, crawl, CrossScreening, csp, cvequality, cvxclustr, Cyclops, dams, datasauRus, data.table, deconvolveR, demi, DGCA, dielectric, dimRed, directlabels, disclapmix, doBy, dpcR, dplyr, DrBats, earthtones, EbayesThresh, ecb, ecoengine, edfReader, edgarWebR, eemR, eesim, EFDR, emuR, enrichwith, etl, etm, eurostat, evaluate, expss, ExtDist, eyelinker, FDboost, fermicatsR, fetchR, FField, fiftystater, fingertipsR, fitbitScraper, fitdistrplus, flacco, flexrsurv, flowr, forcats, ForecastFramework, forwards, fourierin, fractional, frequencyConnectedness, freqweights, frontiles, funData, funrar, fuser, fuzzyjoin, gapminder, gcookbook, GDAdata, gender, geoknife, getCRUCLdata, GetHFData, GetTDData, ggROC, githubinstall, glmmTMB, googlesheets, grattan, Greg, gridDebug, gridExtra, GROAN, groupdata2, growthcurver, gsloid, GSODR, gutenbergr, h2o, hazus, hdr, hei, heuristica, highcharter, hIRT, HistData, historydata, httk, huxtable, HWxtest, icarus, icd9, imager, imaginator, installr, JacobiEigen, jmvcore, jpndistrict, jtools, kamila, keras, kfigr, Kmisc, knitrBootstrap, KSD, Lahman, latex2exp, lda, LDheatmap, LEAP, lme4, logitnorm, longCatEDA, lspline, ltbayes, MAc, macleish, MAd, maddison, magick, margins, marked, matrixStats, medicalrisk, medicare, metricsgraphics, MGLM, microplot, milr, mistat, mixpack, mlrMBO, mmpf, modelr, MOEADr, moonBook, mosaicData, MSG, mthapower, MultiBD, munsell, musica, mvtboost, mwaved, natserv, neurobase, nimble, NlsyLinks, nLTT, NNTbiomarker, nzelect, oapackage, observer, OECD, openwindfarm, optiSel, packcircles, padr, pafdR, pagenum, palettetown, pals, pander, parallelDist, ParamHelpers, parlitools, parsemsf, passport, PBImisc, PDQutils, PeakError, PeakSegDP, PeakSegJoint, PeakSegOptimal, peptider, photobiologyInOut, photobiologyLamps, photobiologyLEDs, photobiologyPlants, physiology, pivottabler, PKNCA, playwith, plspm, pomp, popEpi, popReconstruct, predatory, preference, preprocomb, profr, profvis, ProjectTemplate, PRROC, PSCBS, psd, pseval, pwr, pxweb, qualvar, queuecomputer, R2admb, R6, ragtop, raincpc, rangemodelR, rasterVis, rattle, raw, rbefdata, rclimateca, RcmdrPlugin.MA, RCMIP5, RcppTN, rdefra, RDML, rdpla, Rdtq, recipes, rem, replyr, ReporteRs, rerddap, reval, revdbayes, rex, RFinfer, rfordummies, RGCCA, rivr, rmetasim, RndTexExams, Rnightlights, rnpn, robustbase, rODE, rollply, ropenaq, rpdo, rpf, rPref, rsample, rsoi, rsvd, rsvg, rtematres, rtf, rtide, rtimes, sadists, SamplerCompare, sand, scanstatistics, scdhlm, SDaA, SDEFSR, sdmpredictors, sdmvspecies, seewave, sensitivity, sf, sgmcmc, shiny, shinyjqui, sigmoid, simcausal, SimDesign, simglm, simstudy, simTool, simulator, sitmo, sjlabelled, sjmisc, sjstats, slim, Sofi, sotkanet, sparklyr, sparseMVN, spbabel, splithalf, srvyr, StructFDR, SuperLearner, surveillance, tableone, tabplot, taRifx, TeachingDemos, testassay, Thermimage, tictactoe, tidyjson, tidytext, tigris, tikzDevice, TimeProjection, tmap, Tmisc, tourr, tourrGui, toxboot, trapezoid, treecm, treespace, tropr, tufterhandout, tukeytrend, UBL, ukgasapi, unvotes, UsingR, usmap, vcdExtra, vcfR, vdiffr, vipor, viridisLite, visreg, VSE, vtreat, warbleR, wbstats, WeightedROC, wesanderson, WHO, widyr, wikipediatrend, wordbankr, wrswoR, wrswoR.benchmark, xgboost, XLConnect, xtractomatic, zenplots, zoo, zoocat
Reverse
enhances
rsunlight, tis
Reverse
linking to

Package ggplot2
Materials
URL http://ggplot2.tidyverse.org https://github.com/tidyverse/ggplot2
Task Views Graphics , Phylogenetics
Version 2.2.1
Published 2016-12-30
License GPL-2 | file LICENSE
BugReports https://github.com/tidyverse/ggplot2/issues
SystemRequirements
NeedsCompilation no
Citation
CRAN checks ggplot2 check results
Package source ggplot2_2.2.1.tar.gz