Skip to content
/ ggwrap Public

🌯 Wrap ggplot2 plots over multiple rows

Notifications You must be signed in to change notification settings

wilkox/ggwrap

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Travis-CI Build Status CRAN_Status_Badge lifecycle

‘ggwrap’ wraps a ‘ggplot2’ plot over multiple rows, to make plots with long x axes easier to read.

Installation

The development version of ‘ggwrap’ can be installed from GitHub:

devtools::install_github("wilkox/ggwrap")

Usage

The ggwrap function takes two arguments: a ‘ggplot2’ plot, and the number of rows over which the plot should be wrapped.

Here’s a simple plot.

library(ggplot2)
library(ggwrap)
plot <- ggplot(economics, aes(x = date, y = unemploy, colour = uempmed)) +
  geom_line()
plot

We can use ggwrap to wrap the plot over four rows.

ggwrap(plot, 4)

About

🌯 Wrap ggplot2 plots over multiple rows

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages