Learn R Programming

⚠️There's a newer version (0.9.6) of this package.Take me there.

ggrepel

Build Status CRAN_Status_Badge CRAN_Downloads_Badge

Overview

ggrepel provides geoms for ggplot2 to repel overlapping text labels:

  • geom_text_repel()
  • geom_label_repel()

Text labels repel away from each other, away from data points, and away from edges of the plotting area.

library(ggrepel)
ggplot(mtcars, aes(wt, mpg, label = rownames(mtcars))) +
  geom_text_repel() +
  geom_point(color = 'red') +
  theme_classic(base_size = 16)

Installation

# The easiest way to get ggrepel is to install it from CRAN:
install.packages("ggrepel")

# Or get the the development version from GitHub:
# install.packages("devtools")
devtools::install_github("slowkow/ggrepel")

Usage

See the examples page to learn more about how to use ggrepel in your project.

Contributing

Please submit an issue to report bugs or ask questions.

Please contribute bug fixes or new features with a pull request to this repository.

Copy Link

Version

Install

install.packages('ggrepel')

Monthly Downloads

347,381

Version

0.9.1

License

GPL-3 | file LICENSE

Issues

Pull Requests

Stars

Forks

Last Published

January 15th, 2021

Functions in ggrepel (0.9.1)

GeomLabelRepel

GeomLabelRepel
position_nudge_repel

Nudge labels a fixed distance from points
geom_label_repel

Repulsive textual annotations.
ggrepel

ggrepel