Create Elegant Data Visualisations Using the Grammar of Graphics


[Up] [Top]

Documentation for package ‘ggplot2’ version 3.0.0

Help Pages

A B C D E F G H I L M P Q R S T V X Y misc

-- A --

aes Construct aesthetic mappings
aes_ Define aesthetic mappings programatically
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
aes_q Define aesthetic mappings programatically
aes_string Define aesthetic mappings programatically
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

-- B --

borders Create a layer of map borders

-- C --

color Colour related aesthetics: colour, fill and alpha
colour Colour related aesthetics: colour, fill and alpha
CoordSf Visualise sf objects
coord_cartesian Cartesian coordinates
coord_equal Cartesian coordinates with fixed "aspect ratio"
coord_fixed Cartesian coordinates with fixed "aspect ratio"
coord_flip Cartesian coordinates with x and y flipped
coord_map Map projections
coord_polar Polar coordinates
coord_quickmap Map projections
coord_sf Visualise sf objects
coord_trans Transformed Cartesian coordinate system
cut_interval Discretise numeric data into categorical
cut_number Discretise numeric data into categorical
cut_width Discretise numeric data into categorical

-- D --

derive Specify a secondary axis
diamonds Prices of 50,000 round cut diamonds
dup_axis Specify a secondary axis

-- E --

economics US economic time series
economics_long US economic time series
element_blank Theme elements
element_line Theme elements
element_rect Theme elements
element_text Theme elements
expand_limits Expand the plot limits, using data
expand_scale Generate expansion vector for scales.

-- F --

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
fill Colour related aesthetics: colour, fill and alpha
format.ggproto Format or print a ggproto object
fortify Fortify a model with data.

-- G --

GeomSf Visualise sf objects
geom_abline Reference lines: horizontal, vertical, and diagonal
geom_area Ribbons and area plots
geom_bar Bar charts
geom_bin2d Heatmap of 2d bin counts
geom_blank Draw nothing
geom_boxplot A box and whiskers plot (in the style of Tukey)
geom_col Bar charts
geom_contour 2d contours of a 3d surface
geom_count Count overlapping points
geom_crossbar Vertical intervals: lines, crossbars & errorbars
geom_curve Line segments and curves
geom_density Smoothed density estimates
geom_density2d Contours of a 2d density estimate
geom_density_2d Contours of a 2d density estimate
geom_dotplot Dot plot
geom_errorbar Vertical intervals: lines, crossbars & errorbars
geom_errorbarh Horizontal error bars
geom_freqpoly Histograms and frequency polygons
geom_hex Hexagonal heatmap of 2d bin counts
geom_histogram Histograms and frequency polygons
geom_hline Reference lines: horizontal, vertical, and diagonal
geom_jitter Jittered points
geom_label Text
geom_line Connect observations
geom_linerange Vertical intervals: lines, crossbars & errorbars
geom_map Polygons from a reference map
geom_path Connect observations
geom_point Points
geom_pointrange Vertical intervals: lines, crossbars & errorbars
geom_polygon Polygons
geom_qq A quantile-quantile plot
geom_qq_line A quantile-quantile plot
geom_quantile Quantile regression
geom_raster Rectangles
geom_rect Rectangles
geom_ribbon Ribbons and area plots
geom_rug Rug plots in the margins
geom_segment Line segments and curves
geom_sf Visualise sf objects
geom_smooth Smoothed conditional means
geom_spoke Line segments parameterised by location, direction and distance
geom_step Connect observations
geom_text Text
geom_tile Rectangles
geom_violin Violin plot
geom_vline Reference lines: horizontal, vertical, and diagonal
ggplot Create a new ggplot
ggproto Create a new ggproto object
ggproto_parent Create a new ggproto object
ggsave Save a ggplot (or other grid object) with sensible defaults
ggsf Visualise sf objects
ggtitle Modify axis, legend, and plot labels
group Aesthetics: grouping
guides Set guides for each scale
guide_colorbar Continuous colour bar guide
guide_colourbar Continuous colour bar guide
guide_legend Legend guide

-- H --

hmisc A selection of summary functions from Hmisc

-- I --

is.ggproto Create a new ggproto object

-- L --

labeller Construct labelling specification
labellers Useful labeller functions
label_both Useful labeller functions
label_bquote Label with mathematical expressions
label_context Useful labeller functions
label_parsed Useful labeller functions
label_value Useful labeller functions
label_wrap_gen Useful labeller functions
labs Modify axis, legend, and plot labels
lims Set scale limits
linetype Differentiation related aesthetics: linetype, size, shape
luv_colours 'colors()' in Luv space

-- M --

margin Theme elements
mean_cl_boot A selection of summary functions from Hmisc
mean_cl_normal A selection of summary functions from Hmisc
mean_sdl A selection of summary functions from Hmisc
mean_se Calculate mean and standard error
median_hilow A selection of summary functions from Hmisc
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

-- P --

plot.ggplot Explicitly draw plot
position_dodge Dodge overlapping objects side-to-side
position_dodge2 Dodge overlapping objects side-to-side
position_fill Stack overlapping objects on top of each another
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 Stack overlapping objects on top of each another
presidential Terms of 11 presidents from Eisenhower to Obama
print.ggplot Explicitly draw plot
print.ggproto Format or print a ggproto object

-- Q --

qplot Quick plot
quickplot Quick plot

-- R --

rel Theme elements
resolution Compute the "resolution" of a numeric vector

-- S --

scale_alpha Alpha transparency scales
scale_alpha_continuous Alpha transparency scales
scale_alpha_date Alpha transparency scales
scale_alpha_datetime Alpha transparency scales
scale_alpha_discrete Alpha transparency scales
scale_alpha_identity Use values without scaling
scale_alpha_manual Create your own discrete scale
scale_alpha_ordinal Alpha transparency scales
scale_color_brewer Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_color_continuous Gradient colour scales
scale_color_discrete Evenly spaced colours for discrete data
scale_color_distiller Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_color_gradient Gradient colour scales
scale_color_gradient2 Gradient colour scales
scale_color_gradientn Gradient colour scales
scale_color_grey Sequential grey colour scales
scale_color_hue Evenly spaced colours for discrete data
scale_color_identity Use values without scaling
scale_color_manual Create your own discrete scale
scale_color_viridis_c Viridis colour scales from viridisLite
scale_color_viridis_d Viridis colour scales from viridisLite
scale_colour_brewer Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_colour_continuous Continuous colour scales
scale_colour_date Gradient colour scales
scale_colour_datetime Gradient colour scales
scale_colour_discrete Evenly spaced colours for discrete data
scale_colour_distiller Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_colour_gradient Gradient colour scales
scale_colour_gradient2 Gradient colour scales
scale_colour_gradientn Gradient colour scales
scale_colour_grey Sequential grey colour scales
scale_colour_hue Evenly spaced colours for discrete data
scale_colour_identity Use values without scaling
scale_colour_manual Create your own discrete scale
scale_colour_ordinal Viridis colour scales from viridisLite
scale_colour_viridis_c Viridis colour scales from viridisLite
scale_colour_viridis_d Viridis colour scales from viridisLite
scale_continuous_identity Use values without scaling
scale_discrete_identity Use values without scaling
scale_discrete_manual Create your own discrete scale
scale_fill_brewer Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_fill_continuous Continuous colour scales
scale_fill_date Gradient colour scales
scale_fill_datetime Gradient colour scales
scale_fill_discrete Evenly spaced colours for discrete data
scale_fill_distiller Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_fill_gradient Gradient colour scales
scale_fill_gradient2 Gradient colour scales
scale_fill_gradientn Gradient colour scales
scale_fill_grey Sequential grey colour scales
scale_fill_hue Evenly spaced colours for discrete data
scale_fill_identity Use values without scaling
scale_fill_manual Create your own discrete scale
scale_fill_ordinal Viridis colour scales from viridisLite
scale_fill_viridis_c Viridis colour scales from viridisLite
scale_fill_viridis_d Viridis colour scales from viridisLite
scale_linetype Scale for line patterns
scale_linetype_continuous Scale for line patterns
scale_linetype_discrete Scale for line patterns
scale_linetype_identity Use values without scaling
scale_linetype_manual Create your own discrete scale
scale_radius Scales for area or radius
scale_shape Scales for shapes, aka glyphs
scale_shape_continuous Scales for shapes, aka glyphs
scale_shape_discrete Scales for shapes, aka glyphs
scale_shape_identity Use values without scaling
scale_shape_manual Create your own discrete scale
scale_shape_ordinal Scales for shapes, aka glyphs
scale_size Scales for area or radius
scale_size_area Scales for area or radius
scale_size_continuous Scales for area or radius
scale_size_date Scales for area or radius
scale_size_datetime Scales for area or radius
scale_size_discrete Scales for area or radius
scale_size_identity Use values without scaling
scale_size_manual Create your own discrete scale
scale_size_ordinal Scales for area or radius
scale_x_continuous Position scales for continuous data (x & y)
scale_x_date Position scales for date/time data
scale_x_datetime Position scales for date/time data
scale_x_discrete Position scales for discrete data
scale_x_log10 Position scales for continuous data (x & y)
scale_x_reverse Position scales for continuous data (x & y)
scale_x_sqrt Position scales for continuous data (x & y)
scale_x_time Position scales for date/time data
scale_y_continuous Position scales for continuous data (x & y)
scale_y_date Position scales for date/time data
scale_y_datetime Position scales for date/time data
scale_y_discrete Position scales for discrete data
scale_y_log10 Position scales for continuous data (x & y)
scale_y_reverse Position scales for continuous data (x & y)
scale_y_sqrt Position scales for continuous data (x & y)
scale_y_time Position scales for date/time data
seals Vector field of seal movements
sec_axis Specify a secondary axis
shape Differentiation related aesthetics: linetype, size, shape
size Differentiation related aesthetics: linetype, size, shape
stat Calculated aesthetics
StatSf Visualise sf objects
stat_bin Histograms and frequency polygons
stat_bin2d Heatmap of 2d bin counts
stat_binhex Hexagonal heatmap of 2d bin counts
stat_bin_2d Heatmap of 2d bin counts
stat_bin_hex Hexagonal heatmap of 2d bin counts
stat_boxplot A box and whiskers plot (in the style of Tukey)
stat_contour 2d contours of a 3d surface
stat_count Bar charts
stat_density Smoothed density estimates
stat_density2d Contours of a 2d density estimate
stat_density_2d Contours of a 2d density estimate
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_qq A quantile-quantile plot
stat_qq_line A quantile-quantile plot
stat_quantile Quantile regression
stat_sf Visualise sf objects
stat_smooth Smoothed conditional means
stat_spoke Line segments parameterised by location, direction and distance
stat_sum Count overlapping points
stat_summary Summarise y values at unique/binned x
stat_summary2d Bin and summarise in 2d (rectangle & hexagons)
stat_summary_2d Bin and summarise in 2d (rectangle & hexagons)
stat_summary_bin Summarise y values at unique/binned x
stat_summary_hex Bin and summarise in 2d (rectangle & hexagons)
stat_unique Remove duplicates
stat_ydensity Violin plot
summarise_coord Summarise built plot objects
summarise_layers Summarise built plot objects
summarise_layout Summarise built plot objects
summarise_plot Summarise built plot objects

-- T --

theme Modify components of a theme
theme_bw Complete themes
theme_classic Complete themes
theme_dark Complete themes
theme_get Get, set, and modify the active theme
theme_gray Complete themes
theme_grey Complete themes
theme_light Complete themes
theme_linedraw Complete themes
theme_minimal Complete themes
theme_replace Get, set, and modify the active theme
theme_set Get, set, and modify the active theme
theme_test Complete themes
theme_update Get, set, and modify the active theme
theme_void Complete themes
txhousing Housing sales in TX

-- V --

vars Quote faceting variables

-- X --

x Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
xend Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
xlab Modify axis, legend, and plot labels
xlim Set scale limits
xmax Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
xmin Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend

-- Y --

y Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
yend Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
ylab Modify axis, legend, and plot labels
ylim Set scale limits
ymax Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
ymin Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend

-- misc --

%+% Add components to a plot
%+replace% Get, set, and modify the active theme
+.gg Add components to a plot