Docs Ggplot2 Org
Docs Ggplot2 Org
Index
Help topics
Geoms
Geoms, short for geometric objects, describe the type of plot you will produce.
geom_abline (geom_hline, geom_vline)
Lines: horizontal, vertical, and specified by slope and intercept.
geom_bar (stat_count)
Bars, rectangles with bases on x-axis
geom_bin2d (stat_bin2d, stat_bin_2d)
Add heatmap of 2d bin counts.
geom_blank
Dot plot
geom_errorbarh
converted by W eb2PDFConvert.com
geom_violin (stat_ydensity)
Violin plot.
Statistics
It's often useful to transform your data before plotting, and that's what statistical transformations do.
stat_ecdf
Superimpose a function.
stat_identity
Identity statistic.
stat_qq (geom_qq)
Calculation for quantile-quantile plot.
stat_summary_2d (stat_summary2d, stat_summary_hex)
Bin and summarise in 2d (rectangle & hexagons)
stat_unique
Remove duplicates.
Scales
Scales control the mapping between data and aesthetics.
expand_limits
Legend guide.
guide_colourbar (guide_colorbar)
Continuous colour bar guide.
lims (xlim, ylim)
Convenience functions to set the axis limits.
scale_alpha (scale_alpha_continuous, scale_alpha_discrete)
Alpha scales.
scale_colour_brewer (scale_color_brewer, scale_color_distiller, scale_colour_distiller, scale_fill_brewer, scale_fill_distiller)
Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_colour_gradient (scale_color_continuous, scale_color_gradient, scale_color_gradient2, scale_color_gradientn,
scale_colour_continuous, scale_colour_date, scale_colour_datetime, scale_colour_gradient2, scale_colour_gradientn, scale_fill_continuous,
scale_fill_date, scale_fill_datetime, scale_fill_gradient, scale_fill_gradient2, scale_fill_gradientn)
Smooth gradient between two colours
scale_colour_grey (scale_color_grey, scale_fill_grey)
Sequential grey colour scale.
scale_colour_hue (scale_color_discrete, scale_color_hue, scale_colour_discrete, scale_fill_discrete, scale_fill_hue)
Qualitative colour scale with evenly spaced hues.
scale_identity (scale_alpha_identity, scale_color_identity, scale_colour_identity, scale_fill_identity, scale_linetype_identity,
scale_shape_identity, scale_size_identity)
Use values without scaling.
scale_manual (scale_alpha_manual, scale_color_manual, scale_colour_manual, scale_fill_manual, scale_linetype_manual,
scale_shape_manual, scale_size_manual)
Create your own discrete scale.
scale_linetype (scale_linetype_continuous, scale_linetype_discrete)
Scale for line patterns.
scale_shape (scale_shape_continuous, scale_shape_discrete)
Scale for shapes, aka glyphs.
scale_size (scale_radius, scale_size_area, scale_size_continuous, scale_size_date, scale_size_datetime, scale_size_discrete)
Scale size (area or radius).
scale_x_discrete (scale_y_discrete)
Discrete position.
labs (ggtitle, xlab, ylab)
Change axis labels and legend titles
update_labels
converted by W eb2PDFConvert.com
Coordinate systems
Coordinate systems adjust the mapping from coordinates to the 2d plane of the computer screen.
coord_cartesian
Cartesian coordinates.
coord_fixed (coord_equal)
Cartesian coordinates with fixed relationship between x and y scales.
coord_flip
Polar coordinates.
coord_trans
Faceting
Facets display subsets of the dataset in different panels.
facet_grid
Backquoted labeller
Position adjustments
Position adjustments can be used to fine tune positioning of objects to achieve effects like dodging, jittering and stacking.
position_dodge
Nudge points.
position_jitter
Data
Data sets included in ggplot2 and used in examples
diamonds
colors()
midwest
Midwest demographics.
mpg
Fuel economy data from 1999 and 2008 for 38 popular models of car
msleep
converted by W eb2PDFConvert.com
seals
Annotation
Specialised functions for adding annotations to a plot
annotate
Annotation: maps.
annotation_raster
Fortify
Fortify methods make it possible to use ggplot2 with objects of various types, not just data frames.
fortify
Supplement the data fitted to a linear model with model fit statistics.
fortify.map
Themes
Themes control non-data components of the plot
add_theme
Define margins.
rel
Plot creation
ggplot (ggplot.data.frame, ggplot.default)
Create a new ggplot plot.
qplot (quickplot)
Quick plot
+.gg (%+%, %+replace%)
Add a new component to a ggplot or theme object.
autoplot
Aesthetics
aes
Aesthetics: group
aes_linetype_size_shape (linetype, shape, size)
Differentiation related aesthetics: linetype, size, shape
aes_position (x, xend, xmax, xmin, y, yend, ymax, ymin)
Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
ggproto
ggproto (ggproto_parent)
Create a new ggproto object
print.ggproto
Other
as_labeller
converted by W eb2PDFConvert.com
Vignettes
Extending ggplot2
Aesthetic specifications
Dependencies
Imports: digest, grid, gtable, MASS, plyr, reshape2, scales, stats
Suggests: covr, ggplot2movies, hexbin, Hmisc, lattice, mapproj, maps, maptools, mgcv, multcomp, nlme, testthat, quantreg, knitr, rpart, rmarkdown,
svglite
Authors
Hadley Wickham [aut, cre]
Winston Chang [aut]
RStudio [cph]
What do you think of the documentation? Please let me know by filling out this short online survey.
Built by staticdocs. Styled with bootstrap.
Back to top
converted by W eb2PDFConvert.com