cowplot v1.0.0

0

Monthly downloads

0th

Percentile

Streamlined Plot Theme and Plot Annotations for 'ggplot2'

Provides various features that help with creating publication-quality figures with 'ggplot2', such as a set of themes, functions to align plots and arrange them into complex compound figures, and functions that make it easy to annotate plots and or mix plots with images. The package was originally written for internal use in the Wilke lab, hence the name (Claus O. Wilke's plot package). It has also been used extensively in the book Fundamentals of Data Visualization.

Readme

cowplot logo

cowplot – Streamlined plot theme and plot annotations for ggplot2

Build Status Coverage Status CRAN\_Status\_Badge CRAN\_Downloads\_Badge DOI

The cowplot package provides various features that help with creating publication-quality figures, such as a set of themes, functions to align plots and arrange them into complex compound figures, and functions that make it easy to annotate plots and or mix plots with images. The package was originally written for internal use in the Wilke lab, hence the name (Claus O. Wilke's plot package). It has also been used extensively in the book Fundamentals of Data Visualization.

Installation

The cowplot package is available on CRAN and can be installed via

install.packages("cowplot")

To install the latest development version of the package using the devtools package, enter the following in your R console:

devtools::install_github("wilkelab/cowplot")

Usage

To get a quick introduction to the main features of this package, read the introductory vignette. For a more in-depth discussion, read all vignettes and/or the reference documentation.

Functions in cowplot

Name Description
add_sub Add annotation underneath a plot
align_margin Align multiple plots along a specified margin
draw_label Draw a text label or mathematical expression.
draw_image Draw an image
insert_xaxis_grob Insert an axis-like grob on either side of a plot panel in a ggplot2 plot.
draw_figure_label Add a label to a figure
panel_border Add/remove the panel border in a ggplot2 plot
get_plot_component Get plot components
draw_grob Draw a grob.
get_y_axis Get plot axes
ggdraw Set up a drawing layer on top of a ggplot
get_title Get plot titles
background_grid Add/modify/remove the background grid in a ggplot2 plot
theme_nothing Create a completely empty theme
theme_minimal_grid Minimalistic themes with grids
draw_line Draw a line from connected points
cowplot cowplot.
align_plots Align multiple plots vertically and/or horizontally
as_grob Convert a base plot or a ggplot2 plot into a grob
rectangle_key_glyph Create customizable legend key glyphs
ggsave2 Cowplot reimplementation of ggsave().
gtable_remove_grobs Remove named elements from gtable
draw_plot Draw a (sub)plot.
png_null_device Null devices
plot_grid Arrange multiple plots into a grid
save_plot Alternative to ggsave(), with better support for multi-figure plots.
as_gtable Convert plot or other graphics object into a gtable
axis_canvas Generates a canvas onto which one can draw axis-like objects.
get_legend Retrieve the legend of a plot
get_panel Retrieve the panel or part of a panel of a plot
gtable_squash_cols Set the width of given colums to 0.
theme_map Create a theme for map plotting
theme_cowplot Create the default cowplot theme
gtable_squash_rows Set the height of given rows to 0.
draw_plot_label Add a label to a plot
draw_text Draw multiple text-strings in one go.
stamp Stamp plots with a label, such as good, bad, or ugly.
set_null_device Sets the null graphics device
No Results!

Vignettes of cowplot

Name
introduction.Rmd
No Results!

Last month downloads

Details

URL https://wilkelab.org/cowplot
BugReports https://github.com/wilkelab/cowplot/issues
License GPL-2
LazyData true
VignetteBuilder knitr
Collate 'add_sub.R' 'align_plots.R' 'as_grob.R' 'as_gtable.R' 'axis_canvas.R' 'cowplot.R' 'draw.R' 'get_plot_component.R' 'get_axes.R' 'get_titles.R' 'get_legend.R' 'get_panel.R' 'gtable.R' 'key_glyph.R' 'plot_grid.R' 'save.R' 'set_null_device.R' 'setup.R' 'stamp.R' 'themes.R' 'utils_ggplot2.R'
RoxygenNote 6.1.1
NeedsCompilation no
Packaged 2019-07-10 14:30:57 UTC; clauswilke
Repository CRAN
Date/Publication 2019-07-11 12:22:55 UTC

Include our badge in your README

[![Rdoc](http://www.rdocumentation.org/badges/version/cowplot)](http://www.rdocumentation.org/packages/cowplot)