Learn R Programming

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

ggjoy

Geoms to make joyplots using ggplot2, written by Claus O. Wilke

This package has now been officially relased on CRAN. Most things should work as expected, and the API should now be relatively stable. For feedback and feature requests, please open issues on github.

About joyplots

Joyplots are partially overlapping line plots that create the impression of a mountain range. They can be quite useful for visualizing changes in distributions over time or space. The name "joyplot" was proposed by Jenny Bryan on Twitter on April 24, 2017, in reference to the iconic cover art for Joy Division's album Unknown Pleasures.

Installation

Stable release:

install.packages("ggjoy")

Latest development version:

library(devtools)
install_github("clauswilke/ggjoy")

Usage

library(ggplot2)
library(ggjoy)
    
ggplot(diamonds, aes(x = price, y = cut)) +
  geom_joy(scale = 4) + theme_joy() +
  scale_y_discrete(expand = c(0.01, 0)) +   # will generally have to set the `expand` option
  scale_x_continuous(expand = c(0, 0))      # for both axes to remove unneeded padding
#> Picking joint bandwidth of 458

Documentation and Examples

First read the package vignette. Then read the reference manual.

Copy Link

Version

Install

install.packages('ggjoy')

Monthly Downloads

62

Version

0.3.0

License

GPL-2 | file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Claus O Wilke

Last Published

July 30th, 2017

Functions in ggjoy (0.3.0)

Catalan_elections

Results from Catalan regional elections (1980-2015)
geom_joy

Create joyplot
ggjoy

ggjoy.
lincoln_weather

Weather in Lincoln, Nebraska in 2016.
scale_cyclical

Create a discrete scale that cycles between values
stat_binline

Stat for histogram joyplots
geom_ridgeline

Plot a ridgeline (line with filled area underneath)
geom_ridgeline_gradient

Plot ridgelines and joyplots with fill gradients along the x axis
stat_joy

Stat for density joyplots
theme_joy

A custom theme specifically for use with joyplots