Learn R Programming

About

gghalves makes it easy to compose your own half-half plots via ggplot2. Think displaying a boxplot next to jittered points, or violin plots side by side with dotplots.

Installation

gghalves can be installed via GitHub:

if (!require(devtools)) {
    install.packages('devtools')
}
devtools::install_github('erocoar/gghalves')

Features

gghalves adds _half_ extensions to selected geoms:

  • geom_half_boxplot
  • geom_half_violin
  • geom_half_point

All of them have a side argument that can be either l for left or r for right half. As a special case there is also geom_half_dotplot to support half dotplots that dodge aesthetics such as fill and colour.

gghalves also works well with other ggplot2 geoms and extensions such as geom_dotplot and ggbeeswarm::geom_beeswarm.

Roadmap

Generally, I hope to add more features over time. If you would like to see a certain feature, please open an issue.

Copy Link

Version

Install

install.packages('gghalves')

Monthly Downloads

5,037

Version

0.1.4

License

MIT + file LICENSE

Issues

Pull Requests

Stars

Forks

Maintainer

Frederik Tiedemann

Last Published

November 20th, 2022

Functions in gghalves (0.1.4)

geom_half_point_panel

Points with jitter for half geoms. Unlike `geom_half_point`, `geom_half_point_panel` does not dodge different grouping aesthetics. This allows multiple groups in a single cloud of points (see examples).
geom_half_violin

Half Violin plot
GeomHalfDotplot

gghalves extensions to ggplot2
geom_half_boxplot

A half boxplot
geom_half_point

Points with jitter for half geoms.
geom_half_dotplot

Half dot plot with sensible parameter settings.