ggalign: Align ggplot2 Graph Edges

Description Usage Arguments Value Author(s) References Examples

Description

Align ggplot2 graph edges.

Usage

1
ggalign(plot1, plot2)

Arguments

plot1

A ggplot2 plot.

plot2

A ggplot2 plot.

Value

Returns a stacked grid object with left/right edges aligned.

Author(s)

Baptiste Auguie

References

http://stackoverflow.com/a/13295880/1000343

Examples

1
2
3
4
require(ggplot2)
A <- ggplot(CO2, aes(x=Plant)) + geom_bar() + coord_flip() 
B <- ggplot(CO2, aes(x=Type)) + geom_bar() + coord_flip() 
ggalign(A, B)

trinker/plotflow documentation built on May 31, 2019, 9:42 p.m.