This function aligns ggplots vertically or horizontally

ggAlignPlots(..., plotList = NULL, sizes = NULL, type = "v", draw = TRUE)

Arguments

...

All additional arguments will be interpreted as ggplot2 plot objects and used if and only if plotList is NULL

plotList

A list of ggplot2 plot objects to be aligned.

sizes

A numeric vector or list of values indicating the relative size for each of the objects in plotList or supplied in .... If the plot is supplied in ... the order is the same as the input in this function. If set to NULL all plots will be evenly distributed.

type

A string indicating wheter vertical ("v") or horizontal ("h") alignment should be used for the multi-plot layout.

draw

A boolean value indicating whether to draw the plot(s) (TRUE) or return a graphical object (FALSE).