scale-wrap: scale-wrap

scale_wrapR Documentation

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)

Arguments

n

the number of subplot pieces.

Details

A plot can be broken on both axes (scale_x_break() with scale_y_break()), but a wrapping, breaking or cutting scale cannot be combined with a different one of them.

Value

gg object

Examples

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

ggbreak documentation built on Nov. 26, 2026, 9:08 a.m.