# Animated Interactive Grammar of Graphics

## Documentation for package ‘animint2’ version 2025.1.28

- DESCRIPTION file.
- Package NEWS.

## Help Pages

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

## -- A --

addShowSelectedForLegend | Add a showSelected aesthetic if legend is specified
addSSandCSasAesthetics | Add the showSelected/clickSelects params to the aesthetics mapping
add_theme | Modify properties of an element in a theme object
aes | Define aesthetic mappings.
aes_ | Define aesthetic mappings from strings, or quoted calls and formulas.
aes_colour_fill_alpha | Colour related aesthetics: colour, fill and alpha
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 from strings, or quoted calls and formulas.
aes_string | Define aesthetic mappings from strings, or quoted calls and formulas.
animint | Create an animint
animint2dir | Compile and render an animint in a local directory.
animint2pages | Publish a list of ggplots as interactive visualizations on a GitHub repository
animintOutput | Shiny ui output function
annotate | Create an annotation layer.
annotation_custom | Annotation: Custom grob.
annotation_logticks | Annotation: log tick marks
annotation_map | Annotation: maps.
annotation_raster | Annotation: High-performance rectangular tiling.
as.list.gganimintproto | Convert a gganimintproto object to a list
as_labeller | Coerce to labeller function
autoplot | Create a complete ggplot appropriate to a particular data type

## -- B --

borders | Create a layer of map borders.
breakpoints | The breakpointError of simulated signals

## -- C --

calc_element | Calculate the element properties, by inheriting properties from its parents
checkAnimationTimeVar | Check animation variable for errors
checkExtraParams | Check 'extra_params' argument for duplicates, non-named list
checkForSSandCSasAesthetics | Check if showSelected and clickSelects have been used as aesthetics as in old syntax. If yes, raise error
checkPlotForAnimintExtensions | Performs error checking on the plot for animint extensions
checkPlotList | Check plot.list for errors
checkSingleShowSelectedValue | Issue warnings for non interactive plots where there is only one showSelected value
color | Colour related aesthetics: colour, fill and alpha
colour | Colour related aesthetics: colour, fill and alpha
colsNotToCopy | Filter out columns that do not need to be copied
coord_cartesian | Cartesian coordinates.
coord_equal | Cartesian coordinates with fixed relationship between x and y scales.
coord_fixed | Cartesian coordinates with fixed relationship between x and y scales.
coord_flip | Flipped cartesian coordinates.
coord_map | Map projections.
coord_polar | Polar coordinates.
coord_quickmap | Map projections.
coord_trans | Transformed cartesian coordinate system.
cut_interval | Cut up numeric vector into useful groups.
cut_number | Cut up numeric vector into useful groups.
cut_width | Cut up numeric vector into useful groups.

## -- D --

diamonds | Prices of 50,000 round cut diamonds

## -- E --

economics | US economic time series.
economics_long | US economic time series.
element_blank | Theme element: blank. This theme element draws nothing, and assigns no space
element_line | Theme element: line.
element_rect | Theme element: rectangle.
element_text | Theme element: text.
expand_limits | Expand the plot limits with data.

## -- F --

facet_grid | Lay out panels in a grid.
facet_null | Facet specification: a single panel.
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
FluView | FluView
format.gganimintproto | Format a gganimintproto object
fortify | Fortify a model with data.
fortify.Line | Fortify method for classes from the sp package.
fortify.Lines | Fortify method for classes from the sp package.
fortify.lm | Supplement the data fitted to a linear model with model fit statistics.
fortify.map | Fortify method for map objects.
fortify.Polygon | Fortify method for classes from the sp package.
fortify.Polygons | Fortify method for classes from the sp package.
fortify.sp | Fortify method for classes from the sp package.
fortify.SpatialLinesDataFrame | Fortify method for classes from the sp package.
fortify.SpatialPolygons | Fortify method for classes from the sp package.
fortify.SpatialPolygonsDataFrame | Fortify method for classes from the sp package.

## -- G --

generation.loci | Evolution simulation
geom_abline | Lines: horizontal, vertical, and specified by slope and intercept.
geom_area | Ribbons and area plots.
geom_bar | Bars, rectangles with bases on x-axis
geom_bin2d | Add heatmap of 2d bin counts.
geom_blank | Blank, draws nothing.
geom_contour | Display contours of a 3d surface in 2d.
geom_count | Count the number of observations at each location.
geom_crossbar | Vertical intervals: lines, crossbars & errorbars.
geom_curve | Line segments and curves.
geom_density | Display a smooth density estimate.
geom_density2d | Contours from a 2d density estimate.
geom_density_2d | Contours from 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 | Hexagon binning.
geom_histogram | Histograms and frequency polygons.
geom_hline | Lines: horizontal, vertical, and specified by slope and intercept.
geom_jitter | Points, jittered to reduce overplotting.
geom_label | Textual annotations.
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, as for a scatterplot
geom_pointrange | Vertical intervals: lines, crossbars & errorbars.
geom_polygon | Polygon, a filled path.
geom_qq | Calculation for quantile-quantile plot.
geom_raster | Draw rectangles.
geom_rect | Draw rectangles.
geom_ribbon | Ribbons and area plots.
geom_rug | Marginal rug plots.
geom_segment | Line segments and curves.
geom_smooth | Add a smoothed conditional mean.
geom_spoke | A line segment parameterised by location, direction and distance.
geom_step | Connect observations.
geom_tallrect | ggplot2 geom with xmin and xmax aesthetics that covers the entire y range, useful for clickSelects background elements.
geom_text | Textual annotations.
geom_tile | Draw rectangles.
geom_violin | Violin plot.
geom_vline | Lines: horizontal, vertical, and specified by slope and intercept.
geom_widerect | ggplot2 geom with ymin and ymax aesthetics that covers the entire x range, useful for clickSelects background elements.
getCommonChunk | Save the common columns for each tsv to one chunk
getLayerName | Gives a unique name to each layer in 'saveLayer'
getLayerParams | Get all parameters for a layer
getLegend | Function to get legend information for each scale
getLegendList | Function to get legend information from ggplot
getTextSize | Function to process text size with different types of unit
getUniqueAxisLabels | Get unique axis labels for the plot
gganimintproto | Create a new gganimintproto object
gganimintproto_parent | Create a new gganimintproto object
ggplot | Create a new ggplot plot.
ggplot.data.frame | Create a new ggplot plot.
ggplot.default | Create a new ggplot plot.
ggsave | Save a ggplot (or other grid object) with sensible defaults
ggtheme | ggplot2 themes
ggtitle | Change axis labels, legend titles, plot title/subtitle and below-plot caption.
graphical-units | Graphical units
guides | Set guides for each scale.
guide_colorbar | Continuous colour bar guide.
guide_colourbar | Continuous colour bar guide.
guide_legend | Legend guide.

## -- H --

hmisc | Wrap up a selection of summary functions from Hmisc to make it easy to use with 'stat_summary'.

## -- I --

intreg | Interval regression
is.gganimintproto | Is an object a gganimintproto object?
is.rel | Reports whether x is a rel object
is.rgb | Check if character is an RGB hexadecimal color value
is.theme | Reports whether x is a theme object
issueSelectorWarnings | Issue warnings for selectors

## -- K --

knit_print.animint | Insert an interactive animation into an R markdown document using a customized print method.

## -- L --

labeller | Generic labeller function for facets
labellers | Labeller functions
label_both | Labeller functions
label_bquote | Backquoted labeller
label_context | Labeller functions
label_parsed | Labeller functions
label_value | Labeller functions
label_wrap_gen | Labeller functions
labs | Change axis labels, legend titles, plot title/subtitle and below-plot caption.
last_plot | Retrieve the last plot to be modified or created.
layer | Create a new layer
lims | Convenience functions to set the axis limits.
linetype | Differentiation related aesthetics: linetype, size, shape
luv_colours | 'colors()' in Luv space.

## -- M --

make_bar | Convenience function for an interactive bar that might otherwise be created using stat_summary(geom="bar").
make_tallrect | Make a clickSelects geom_tallrect that completely tiles the x range. This makes it easy to construct tallrects for the common case of selecting a particular x value.
make_tallrect_or_widerect | Make a clickSelects geom_widerect or geom_tallrect that completely tiles the x or y range. This function is used internally by make_tallrect or make_widerect, which are more user-friendly.
make_text | Convenvience function for a showSelected plot label.
make_widerect | Make a clickSelects geom_widerect that completely tiles the y range. This makes it easy to construct widerects for the common case of selecting a particular y value.
map_data | Create a data frame of map data.
margin | Define margins.
mean_cl_boot | Wrap up a selection of summary functions from Hmisc to make it easy to use with 'stat_summary'.
mean_cl_normal | Wrap up a selection of summary functions from Hmisc to make it easy to use with 'stat_summary'.
mean_sdl | Wrap up a selection of summary functions from Hmisc to make it easy to use with 'stat_summary'.
mean_se | Calculate mean and standard errors on either side.
median_hilow | Wrap up a selection of summary functions from Hmisc to make it easy to use with 'stat_summary'.
merge_recurse | Merge a list of data frames.
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.

## -- N --

newEnvironment | Environment to store meta data

## -- P --

parsePlot | Convert a ggplot to a list.
plot.gganimintplot | Draw plot on current graphics device.
position_dodge | Adjust position by dodging overlaps to the side.
position_fill | Stack overlapping objects on top of one another.
position_identity | Don't adjust position
position_jitter | Jitter points to avoid overplotting.
position_jitterdodge | Adjust position by simultaneously dodging and jittering
position_nudge | Nudge points.
position_stack | Stack overlapping objects on top of one another.
presidential | Terms of 11 presidents from Eisenhower to Obama.
print.animint | print animint
print.gganimintplot | Draw plot on current graphics device.
print.gganimintproto | Print a gganimintproto object
pt.to.lines | Convert 'pt' value to 'lines'

## -- Q --

qplot | Quick plot
quickplot | Quick plot

## -- R --

rel | Relative sizing for theme elements
renderAnimint | Create an animint output element
resolution | Compute the "resolution" of a data vector.

## -- S --

saveChunks | Split data set into chunks and save them to separate files.
scale_alpha | Alpha scales.
scale_alpha_continuous | Alpha scales.
scale_alpha_discrete | Alpha scales.
scale_alpha_identity | Use values without scaling.
scale_alpha_manual | Create your own discrete scale.
scale_color_brewer | Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_color_continuous | Smooth gradient between two colours
scale_color_discrete | Qualitative colour scale with evenly spaced hues.
scale_color_distiller | Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_color_gradient | Smooth gradient between two colours
scale_color_gradient2 | Smooth gradient between two colours
scale_color_gradientn | Smooth gradient between two colours
scale_color_grey | Sequential grey colour scale.
scale_color_hue | Qualitative colour scale with evenly spaced hues.
scale_color_identity | Use values without scaling.
scale_color_manual | Create your own discrete scale.
scale_colour_brewer | Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_colour_continuous | Smooth gradient between two colours
scale_colour_date | Smooth gradient between two colours
scale_colour_datetime | Smooth gradient between two colours
scale_colour_discrete | Qualitative colour scale with evenly spaced hues.
scale_colour_distiller | Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_colour_gradient | Smooth gradient between two colours
scale_colour_gradient2 | Smooth gradient between two colours
scale_colour_gradientn | Smooth gradient between two colours
scale_colour_grey | Sequential grey colour scale.
scale_colour_hue | Qualitative colour scale with evenly spaced hues.
scale_colour_identity | Use values without scaling.
scale_colour_manual | Create your own discrete scale.
scale_continuous | Continuous position scales (x & y).
scale_date | Position scale, date & date times
scale_fill_brewer | Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_fill_continuous | Smooth gradient between two colours
scale_fill_date | Smooth gradient between two colours
scale_fill_datetime | Smooth gradient between two colours
scale_fill_discrete | Qualitative colour scale with evenly spaced hues.
scale_fill_distiller | Sequential, diverging and qualitative colour scales from colorbrewer.org
scale_fill_gradient | Smooth gradient between two colours
scale_fill_gradient2 | Smooth gradient between two colours
scale_fill_gradientn | Smooth gradient between two colours
scale_fill_grey | Sequential grey colour scale.
scale_fill_hue | Qualitative colour scale with evenly spaced hues.
scale_fill_identity | Use values without scaling.
scale_fill_manual | Create your own discrete scale.
scale_identity | Use values without scaling.
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_manual | Create your own discrete scale.
scale_radius | Scale size (area or radius).
scale_shape | Scale for shapes, aka glyphs.
scale_shape_continuous | Scale for shapes, aka glyphs.
scale_shape_discrete | Scale for shapes, aka glyphs.
scale_shape_identity | Use values without scaling.
scale_shape_manual | Create your own discrete scale.
scale_size | Scale size (area or radius).
scale_size_animint | Scale point sizes using circle area, but specifying the radius in pixels.
scale_size_area | Scale size (area or radius).
scale_size_continuous | Scale size (area or radius).
scale_size_date | Scale size (area or radius).
scale_size_datetime | Scale size (area or radius).
scale_size_discrete | Scale size (area or radius).
scale_size_identity | Use values without scaling.
scale_size_manual | Create your own discrete scale.
scale_x_continuous | Continuous position scales (x & y).
scale_x_date | Position scale, date & date times
scale_x_datetime | Position scale, date & date times
scale_x_discrete | Discrete position.
scale_x_log10 | Continuous position scales (x & y).
scale_x_reverse | Continuous position scales (x & y).
scale_x_sqrt | Continuous position scales (x & y).
scale_y_continuous | Continuous position scales (x & y).
scale_y_date | Position scale, date & date times
scale_y_datetime | Position scale, date & date times
scale_y_discrete | Discrete position.
scale_y_log10 | Continuous position scales (x & y).
scale_y_reverse | Continuous position scales (x & y).
scale_y_sqrt | Continuous position scales (x & y).
seals | Vector field of seal movements.
selectSSandCS | Separate .variable/.value selectors
setPlotSizes | Set plot width and height for all plots
shape | Differentiation related aesthetics: linetype, size, shape
size | Differentiation related aesthetics: linetype, size, shape
split_recursive | Split data.frame into recursive list of data.frame.
stat_bin | Histograms and frequency polygons.
stat_bin2d | Add heatmap of 2d bin counts.
stat_binhex | Hexagon binning.
stat_bin_2d | Add heatmap of 2d bin counts.
stat_bin_hex | Hexagon binning.
stat_contour | Display contours of a 3d surface in 2d.
stat_count | Bars, rectangles with bases on x-axis
stat_density | Display a smooth density estimate.
stat_density2d | Contours from a 2d density estimate.
stat_density_2d | Contours from a 2d density estimate.
stat_ecdf | Empirical Cumulative Density Function
stat_ellipse | Plot data ellipses.
stat_function | Superimpose a function.
stat_identity | Identity statistic.
stat_qq | Calculation for quantile-quantile plot.
stat_smooth | Add a smoothed conditional mean.
stat_spoke | A line segment parameterised by location, direction and distance.
stat_sum | Count the number of observations at each location.
stat_summary | Summarise y values at unique/binned x 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 x.
stat_summary_hex | Bin and summarise in 2d (rectangle & hexagons)
stat_unique | Remove duplicates.
stat_ydensity | Violin plot.
switch_axes | Flip axes in case of coord_flip Switches column names. Eg. xmin to ymin, yntercept to xintercept etc.

## -- T --

theme | Set theme elements
theme_animint | theme for passing animint specific params
theme_bw | ggplot2 themes
theme_classic | ggplot2 themes
theme_dark | ggplot2 themes
theme_get | Get, set and update themes.
theme_gray | ggplot2 themes
theme_grey | ggplot2 themes
theme_light | ggplot2 themes
theme_linedraw | ggplot2 themes
theme_minimal | ggplot2 themes
theme_replace | Get, set and update themes.
theme_set | Get, set and update themes.
theme_update | Get, set and update themes.
theme_void | ggplot2 themes
toRGB | Convert R colors to RGB hexadecimal color values
transform_shape | Function to transform R shapes into d3 shapes...
translate_qplot_ggplot | Translating between qplot and ggplot
translate_qplot_lattice | Translating between qplot and lattice
txhousing | Housing sales in TX.

## -- U --

update_gallery | Update gallery
update_geom_defaults | Modify geom/stat aesthetic defaults for future plots
update_labels | Update axis/legend labels
update_stat_defaults | Modify geom/stat aesthetic defaults for future plots
UStornadoes | Tornadoes in the United States from 1950 to 2012

## -- V --

varied.chunk | Extract subset for each data.frame in a list of data.frame

## -- W --

WorldBank | Demographics by country from 1960 to 2012
worldPop | World population by subcontinent

## -- 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 | Change axis labels, legend titles, plot title/subtitle and below-plot caption.
xlim | Convenience functions to set the axis 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 | Change axis labels, legend titles, plot title/subtitle and below-plot caption.
ylim | Convenience functions to set the axis 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 a new component to a ggplot or theme object.
%+replace% | Add a new component to a ggplot or theme object.
+.gganimint | Add a new component to a ggplot or theme object.
.pt | Graphical units
.stroke | Graphical units