egg (version 0.4.2)

symmetrise_scale: symmetrise_scale

Description

Adds a blank layer to a ggplot to extend one axis symmetrically about 0 for all facets.

Usage

symmetrise_scale(p, axis = "x")

Arguments

p

ggplot2

axis

axis

Value

plot with scales adjusted

Examples

Run this code
# NOT RUN {
library(ggplot2)
p1 <- qplot(mpg, wt, data=mtcars, colour=cyl) + facet_wrap(~carb, nrow=1, scales='free')
symmetrise_scale(p1, 'y')
# }

Run the code above in your browser using DataLab