Git Product home page Git Product logo

ggrepel's Introduction

ggrepel

Build Status CRAN_Status_Badge CRAN_Downloads_Badge

ggrepel provides geoms for ggplot2 to repel overlapping text labels.

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

geom_text_repel

Usage

See the vignette for more usage examples.

Also, look at the help pages:

?geom_text_repel
?geom_label_repel

Installation

Install the latest stable release from CRAN:

install.packages("ggrepel")

Alternatively, install the latest development version from github:

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.

ggrepel's People

Contributors

slowkow avatar yutannihilation avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.