plotflow (version 0.2.1)

ggalign: Align ggplot2 Graph Edges

Description

Align ggplot2 graph edges.

Usage

ggalign(plot1, plot2)

Arguments

plot1

A ggplot2 plot.

plot2

A ggplot2 plot.

Value

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

References

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

Examples

Run this code
# NOT RUN {
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)
# }

Run the code above in your browser using DataLab