8000 GitHub - Gofer51/ggrepel: Repel overlapping text labels away from each other.
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Gofer51/ggrepel

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ggrepel

ggrepel is an R package that implements functions to repel overlapping text labels away from each other in a plot created by ggplot2.

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

geom_text_repel

Usage

See the vignette for more usage examples.

Installation

install.packages("devtools")
devtools::install_github("slowkow/ggrepel")

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.

Related work

directlabels

This package is an attempt to make direct labeling a reality in everyday statistical practice by making available a body of useful functions that make direct labeling of common plots easy to do with high-level plotting systems such as lattice and ggplot2. The main function that the package provides is direct.label(p), which takes a lattice or ggplot2 plot p and adds direct labels.

wordcloud

Pretty word clouds.

The wordcloud package implements a spiraling algorithm to prevent text labels from overlapping each other.

FField

Force field simulation of interaction of set of points. Very useful for placing text labels on graphs, such as scatterplots.

I found that functions in the FField package were not ideal for repelling overlapping rectangles, so I wrote my own.

See this gist for examples of how to use the wordcloud and FField packages with ggplot2.

About

Repel overlapping text labels away from each other.

Resources

Stars

Watchers

Forks

Packages

No packages published

Languages

  • R 71.4%
  • C++ 28.6%
0