All functions

aes()

Construct aesthetic mappings

aes_() aes_string() aes_q()

Define aesthetic mappings programmatically

aes_colour_fill_alpha

Colour related aesthetics: colour, fill and alpha

aes_group_order

Aesthetics: grouping

aes_linetype_size_shape

Differentiation related aesthetics: linetype, size, shape

aes_position

Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend

annotate()

Create an annotation layer

annotation_custom()

Annotation: Custom grob

annotation_logticks()

Annotation: log tick marks

annotation_map()

Annotation: a maps

annotation_raster()

Annotation: high-performance rectangular tiling

autolayer()

Create a ggplot layer appropriate to a particular data type

autoplot()

Create a complete ggplot appropriate to a particular data type

borders()

Create a layer of map borders

coord_cartesian()

Cartesian coordinates

coord_fixed()

Cartesian coordinates with fixed "aspect ratio"

coord_flip()

Cartesian coordinates with x and y flipped

coord_map() coord_quickmap()

Map projections

coord_polar()

Polar coordinates

coord_trans()

Transformed Cartesian coordinate system

cut_interval() cut_number() cut_width()

Discretise numeric data into categorical

diamonds

Prices of 50,000 round cut diamonds

draw_key_point() draw_key_abline() draw_key_rect() draw_key_polygon() draw_key_blank() draw_key_boxplot() draw_key_crossbar() draw_key_path() draw_key_vpath() draw_key_dotplot() draw_key_pointrange() draw_key_smooth() draw_key_text() draw_key_label() draw_key_vline() draw_key_timeseries()

Key glyphs for legends

economics economics_long

US economic time series

margin() element_blank() element_rect() element_line() element_text() rel()

Theme elements

expand_limits()

Expand the plot limits, using data

expand_scale()

Generate expansion vector for scales.

facet_grid()

Lay out panels in a grid

facet_wrap()

Wrap a 1d ribbon of panels into 2d

faithfuld

2d density estimate of Old Faithful data

fortify()

Fortify a model with data.

geom_abline() geom_hline() geom_vline()

Reference lines: horizontal, vertical, and diagonal

geom_bar() geom_col() stat_count()

Bar charts

geom_bin2d() stat_bin_2d()

Heatmap of 2d bin counts

geom_blank()

Draw nothing

geom_boxplot() stat_boxplot()

A box and whiskers plot (in the style of Tukey)

geom_contour() stat_contour()

2d contours of a 3d surface

geom_count() stat_sum()

Count overlapping points

geom_density() stat_density()

Smoothed density estimates

geom_density_2d() stat_density_2d()

Contours of a 2d density estimate

geom_dotplot()

Dot plot

geom_errorbarh()

Horizontal error bars

geom_hex() stat_bin_hex()

Hexagonal heatmap of 2d bin counts

geom_freqpoly() geom_histogram() stat_bin()

Histograms and frequency polygons

geom_jitter()

Jittered points

geom_crossbar() geom_errorbar() geom_linerange() geom_pointrange()

Vertical intervals: lines, crossbars & errorbars

geom_map()

Polygons from a reference map

geom_path() geom_line() geom_step()

Connect observations

geom_point()

Points

geom_polygon()

Polygons

geom_qq_line() stat_qq_line() geom_qq() stat_qq()

A quantile-quantile plot

geom_quantile() stat_quantile()

Quantile regression

geom_ribbon() geom_area()

Ribbons and area plots

geom_rug()

Rug plots in the margins

geom_segment() geom_curve()

Line segments and curves

geom_smooth() stat_smooth()

Smoothed conditional means

geom_spoke()

Line segments parameterised by location, direction and distance

geom_label() geom_text()

Text

geom_raster() geom_rect() geom_tile()

Rectangles

geom_violin() stat_ydensity()

Violin plot

`+`(<gg>) `%+%`

Add components to a plot

ggplot()

Create a new ggplot

ggproto() ggproto_parent() is.ggproto()

Create a new ggproto object

ggsave()

Save a ggplot (or other grid object) with sensible defaults

coord_sf() geom_sf() geom_sf_label() geom_sf_text() stat_sf()

Visualise sf objects

theme_grey() theme_gray() theme_bw() theme_linedraw() theme_light() theme_dark() theme_minimal() theme_classic() theme_void() theme_test()

Complete themes

guide_colourbar() guide_colorbar()

Continuous colour bar guide

guide_legend()

Legend guide

guides()

Set guides for each scale

mean_cl_boot() mean_cl_normal() mean_sdl() median_hilow()

A selection of summary functions from Hmisc

label_bquote()

Label with mathematical expressions

labeller()

Construct labelling specification

label_value() label_both() label_context() label_parsed() label_wrap_gen()

Useful labeller functions

labs() xlab() ylab() ggtitle()

Modify axis, legend, and plot labels

lims() xlim() ylim()

Set scale limits

luv_colours

colors() in Luv space

mean_se()

Calculate mean and standard error

midwest

Midwest demographics

mpg

Fuel economy data from 1999 and 2008 for 38 popular models of car

msleep

An updated and expanded version of the mammals sleep dataset

position_dodge() position_dodge2()

Dodge overlapping objects side-to-side

position_identity()

Don't adjust position

position_jitter()

Jitter points to avoid overplotting

position_jitterdodge()

Simultaneously dodge and jitter

position_nudge()

Nudge points a fixed distance

position_stack() position_fill()

Stack overlapping objects on top of each another

presidential

Terms of 11 presidents from Eisenhower to Obama

print(<ggplot>) plot(<ggplot>)

Explicitly draw plot

print(<ggproto>) format(<ggproto>)

Format or print a ggproto object

qplot() quickplot()

Quick plot

resolution()

Compute the "resolution" of a numeric vector

scale_alpha() scale_alpha_continuous() scale_alpha_discrete() scale_alpha_ordinal()

Alpha transparency scales

scale_colour_brewer() scale_fill_brewer() scale_colour_distiller() scale_fill_distiller()

Sequential, diverging and qualitative colour scales from colorbrewer.org

scale_colour_continuous() scale_fill_continuous()

Continuous colour scales

scale_x_continuous() scale_y_continuous() scale_x_log10() scale_y_log10() scale_x_reverse() scale_y_reverse() scale_x_sqrt() scale_y_sqrt()

Position scales for continuous data (x & y)

scale_x_date() scale_y_date() scale_x_datetime() scale_y_datetime() scale_x_time() scale_y_time()

Position scales for date/time data

scale_x_discrete() scale_y_discrete()

Position scales for discrete data

scale_colour_gradient() scale_fill_gradient() scale_colour_gradient2() scale_fill_gradient2() scale_colour_gradientn() scale_fill_gradientn()

Gradient colour scales

scale_colour_grey() scale_fill_grey()

Sequential grey colour scales

scale_colour_hue() scale_fill_hue()

Evenly spaced colours for discrete data

scale_colour_identity() scale_fill_identity() scale_shape_identity() scale_linetype_identity() scale_alpha_identity() scale_size_identity() scale_discrete_identity() scale_continuous_identity()

Use values without scaling

scale_linetype() scale_linetype_continuous() scale_linetype_discrete()

Scale for line patterns

scale_colour_manual() scale_fill_manual() scale_size_manual() scale_shape_manual() scale_linetype_manual() scale_alpha_manual() scale_discrete_manual()

Create your own discrete scale

scale_shape()

Scales for shapes, aka glyphs

scale_radius() scale_size() scale_size_area()

Scales for area or radius

scale_colour_viridis_d() scale_fill_viridis_d() scale_colour_viridis_c() scale_fill_viridis_c()

Viridis colour scales from viridisLite

seals

Vector field of seal movements

sec_axis() dup_axis() derive()

Specify a secondary axis

stat()

Calculated aesthetics

stat_ecdf()

Compute empirical cumulative distribution

stat_ellipse()

Compute normal confidence ellipses

stat_function()

Compute function for each x value

stat_identity()

Leave data as is

stat_sf_coordinates()

Extract coordinates from 'sf' objects

stat_summary_bin() stat_summary()

Summarise y values at unique/binned x

stat_summary_2d() stat_summary_hex()

Bin and summarise in 2d (rectangle & hexagons)

stat_unique()

Remove duplicates

theme()

Modify components of a theme

theme_get() theme_set() theme_update() theme_replace() `%+replace%`

Get, set, and modify the active theme

txhousing

Housing sales in TX

vars()

Quote faceting variables