Learn R Programming

⚠️There's a newer version (3.5.0) of this package.Take me there.

ggplot2 (version 2.0.0)

An Implementation of the Grammar of Graphics

Description

An implementation of the grammar of graphics in R. It combines the advantages of both base and lattice graphics: conditioning and shared axes are handled automatically, and you can still build up a plot step by step from multiple data sources. It also implements a sophisticated multidimensional conditioning system and a consistent interface to map data to aesthetic attributes. See http://ggplot2.org for more information, documentation and examples.

Copy Link

Version

Install

install.packages('ggplot2')

Monthly Downloads

1,879,771

Version

2.0.0

License

GPL-2

Issues

Pull Requests

Stars

Forks

Maintainer

Last Published

December 18th, 2015

Functions in ggplot2 (2.0.0)

annotation_raster

Annotation: High-performance rectangular tiling.
as.list.ggproto

Convert a ggproto object to a list
borders

Create a layer of map borders.
cut_interval

Cut up numeric vector into useful groups.
geom_rug

Marginal rug plots.
geom_contour

Display contours of a 3d surface in 2d.
geom_ribbon

Ribbons and area plots.
coord_map

Map projections.
ggproto

Create a new ggproto object
labellers

Labeller functions
scale_manual

Create your own discrete scale.
fortify.map

Fortify method for map objects.
aes_group_order

Aesthetics: group
coord_munch

Munch coordinates data
+.gg

Modify a ggplot or theme object by adding on new components.
aes_auto

Automatic aesthetic mapping
annotate

Create an annotation layer.
coord_fixed

Cartesian coordinates with fixed relationship between x and y scales.
geom_dotplot

Dot plot
annotation_map

Annotation: maps.
aes_

Define aesthetic mappings from strings, or quoted calls and formulas.
last_plot

Retrieve the last plot to be modified or created.
labeller

Generic labeller function for facets
geom_hex

Hexagon binning.
coord_trans

Transformed cartesian coordinate system.
is.ggproto

Is an object a ggproto object?
element_blank

Theme element: blank. This theme element draws nothing, and assigns no space
scale_shape

Scale for shapes, aka glyphs.
coord_cartesian

Cartesian coordinates.
as_labeller

Coerce to labeller function
add_theme

Modify properties of an element in a theme object
gg_dep

Give a deprecation error, warning, or message, depending on version number.
element_text

Theme element: text.
faithfuld

2d density estimate of Old Faithful data
ggplot2-ggproto

Base ggproto classes for ggplot2
geom_bar

Bars, rectangles with bases on x-axis
stat_identity

Identity statistic.
rel

Relative sizing for theme elements
aes_linetype_size_shape

Differentiation related aesthetics: linetype, size, shape
geom_spoke

A line segment parameterised by location, direction and distance.
theme

Set theme elements
luv_colours

colors() in Luv space.
element_grob

Generate grid grob from theme element
geom_polygon

Polygon, a filled path.
aes_colour_fill_alpha

Colour related aesthetics: colour, fill and alpha
geom_segment

Line segments and curves.
seals

Vector field of seal movements.
stat_unique

Remove duplicates.
coord_polar

Polar coordinates.
aes

Define aesthetic mappings.
geom_raster

Draw rectangles.
print.ggproto

Print a ggproto object
is.rel

Reports whether x is a rel object
scale_size

Scale size (area or radius).
discrete_scale

Discrete scale constructor.
geom_blank

Blank, draws nothing.
annotation_logticks

Annotation: log tick marks
ggplot_gtable

Build a plot with all the usual bits and pieces.
geom_bin2d

Add heatmap of 2d bin counts.
annotation_custom

Annotation: Custom grob.
absoluteGrob

Absolute grob
is.Coord

Is this object a coordinate system?
geom_density_2d

Contours from a 2d density estimate.
fortify-multcomp

Fortify methods for objects produced by multcomp
geom_quantile

Add quantile lines from a quantile regression.
guides

Set guides for each scale.
is.facet

Is this object a facetting specification?
position_jitterdodge

Adjust position by simultaneously dodging and jittering
economics

US economic time series.
ggplot

Create a new ggplot plot.
continuous_scale

Continuous scale constructor.
geom_boxplot

Box and whiskers plot.
geom_count

Count the number of observations at each location.
facet_null

Facet specification: a single panel.
position_identity

Don't adjust position
mean_se

Calculate mean and standard errors on either side.
guide_colourbar

Continuous colour bar guide.
format.ggproto

Format a ggproto object
resolution

Compute the "resolution" of a data vector.
facet_grid

Lay out panels in a grid.
position_nudge

Nudge points.
lims

Convenience functions to set the axis limits.
presidential

Terms of 10 presidents from Eisenhower to Bush W.
geom_abline

Lines: horizontal, vertical, and specified by slope and intercept.
element_line

Theme element: line.
geom_freqpoly

Histograms and frequency polygons.
stat_function

Superimpose a function.
limits

Generate correct scale type for specified limits
print.ggplot

Draw plot on current graphics device.
diamonds

Prices of 50,000 round cut diamonds
aes_position

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

Create a complete ggplot appropriate to a particular data type
transform_position

Convenience function to transform all position variables.
position_dodge

Adjust position by dodging overlaps to the side.
coord_flip

Flipped cartesian coordinates.
geom_label

Textual annotations.
expand_limits

Expand the plot limits with data.
scale_linetype

Scale for line patterns.
ggplot_build

Build ggplot for rendering.
mpg

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

Position scale, date & date times
geom_violin

Violin plot.
qplot

Quick plot
stat_ecdf

Empirical Cumulative Density Function
stat_summary_bin

Summarise y values at unique/binned x x.
ggtheme

ggplot2 themes
should_stop

Used in examples to illustrate when errors should occur.
layer

Create a new layer
msleep

An updated and expanded version of the mammals sleep dataset.
element_rect

Theme element: rectangle.
geom_crossbar

Vertical intervals: lines, crossbars & errorbars.
geom_map

Polygons from a reference map.
hmisc

geom_smooth

Add a smoothed conditional mean.
scale_colour_hue

Qualitative colour scale with evenly spaced hues.
theme_update

Get, set and update themes.
scale_identity

Use values without scaling.
ggplotGrob

Generate a ggplot2 plot grob.
geom_jitter

Points, jittered to reduce overplotting.
waiver

A waiver object.
facet_wrap

Wrap a 1d ribbon of panels into 2d.
graphical-units

Graphical units
scale_colour_gradient

Smooth gradient between two colours
scale_continuous

Continuous position scales (x & y).
stat_qq

Calculation for quantile-quantile plot.
txhousing

Housing sales in TX.
zeroGrob

The zero grob draws nothing and has zero size.
margin

Define margins.
reexports

Objects exported from other packages
translate_qplot_base

Translating between qplot and base graphics
benchplot

Benchmark plot creation time. Broken down into construct, build, render and draw times.
fortify.lm

Supplement the data fitted to a linear model with model fit statistics.
fortify.sp

Fortify method for classes from the sp package.
update_geom_defaults

Modify geom/stat aesthetic defaults for future plots
translate_qplot_ggplot

Translating between qplot and ggplot
geom_density

Display a smooth density estimate.
remove_missing

Convenience function to remove missing values from a data.frame
midwest

Midwest demographics.
geom_errorbarh

Horizontal error bars
stat_summary_2d

Bin and summarise in 2d (rectangle & hexagons)
geom_path

Connect observations.
translate_qplot_lattice

Translating between qplot and lattice
update_labels

Update axis/legend labels
geom_point

Points, as for a scatterplot
position_fill

Stack overlapping objects on top of one another.
scale_x_discrete

Discrete position.
map_data

Create a data frame of map data.
position_jitter

Jitter points to avoid overplotting.
scale_alpha

Alpha scales.
calc_element

Calculate the element properties, by inheriting properties from its parents
fortify

Fortify a model with data.
guide_legend

Legend guide.
is.theme

Reports whether x is a theme object
label_bquote

Backquoted labeller
aes_all

Given a character vector, create a set of identity mappings
draw_key

Key drawing functions
facet

Facet specification.
stat_ellipse

Plot data ellipses.
ggsave

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

Reports whether x is a ggplot object
labs

Change axis labels and legend titles
scale_colour_grey

Sequential grey colour scale.
scale_colour_brewer

Sequential, diverging and qualitative colour scales from colorbrewer.org
summary.ggplot

Displays a useful description of a ggplot object