Learn R Programming

ggbreak (version 0.1.5)

scale_wrap: scale-wrap

Description

This scale function wraps a 'gg' plot over multiple rows to make plots with long x axes easier to read.

Usage

scale_wrap(n)

Value

gg object

Arguments

n

the number of subplot pieces.

Examples

Run this code
library(ggplot2)
library(ggbreak)
p <- ggplot(economics, aes(x=date, y = unemploy, colour = uempmed)) +
     geom_line()
p + scale_wrap(n=4)

Run the code above in your browser using DataLab