Plot composition

Arranging and aligning plots

align_margin()

Align multiple plots along a specified margin

align_plots()

Align multiple plots vertically and/or horizontally

plot_grid()

Arrange multiple plots into a grid

Drawing

Place elements on the canvas

draw_figure_label()

Add a label to a figure

draw_grob()

Draw a grob.

draw_image()

Draw an image

draw_label()

Draw a text label or mathematical expression.

draw_line()

Draw a line from connected points

draw_plot()

Draw a (sub)plot.

draw_plot_label()

Add a label to a plot

draw_text()

Draw multiple text-strings in one go.

stamp() stamp_good() stamp_bad() stamp_wrong() stamp_ugly()

Stamp plots with a label, such as good, bad, or ugly.

ggdraw()

Set up a drawing layer on top of a ggplot

add_sub()

Add annotation underneath a plot

axis_canvas()

Generates a canvas onto which one can draw axis-like objects.

Themes

Modify plot appearance

theme_cowplot() theme_half_open()

Create the default cowplot theme

theme_map()

Create a theme for map plotting

theme_minimal_grid() theme_minimal_vgrid() theme_minimal_hgrid()

Minimalistic themes with grids

theme_nothing()

Create a completely empty theme

background_grid()

Add/modify/remove the background grid in a ggplot2 plot

panel_border()

Add/remove the panel border in a ggplot2 plot

rectangle_key_glyph() circle_key_glyph()

Create customizable legend key glyphs

Get methods

Retrieve elements of a plot

get_legend()

Retrieve the legend of a plot

get_panel() get_panel_component()

Retrieve the panel or part of a panel of a plot

get_plot_component() plot_component_names() plot_components()

Get plot components

get_title() get_subtitle()

Get plot titles

get_y_axis() get_x_axis()

Get plot axes

Grobs

Manipulate and convert grobs

gtable_remove_grobs()

Remove named elements from gtable

gtable_squash_cols()

Set the width of given columns to 0.

gtable_squash_rows()

Set the height of given rows to 0.

as_grob()

Convert a base plot or a ggplot2 plot into a grob

as_gtable() plot_to_gtable()

Convert plot or other graphics object into a gtable

insert_xaxis_grob() insert_yaxis_grob()

Insert an axis-like grob on either side of a plot panel in a ggplot2 plot.

Output

Render figures to an output

ggsave2()

Cowplot reimplementation of ggsave().

save_plot()

Alternative to ggsave(), with better support for multi-figure plots.

png_null_device() pdf_null_device() cairo_null_device() agg_null_device()

Null devices

set_null_device()

Sets the null graphics device