ggplot2: Create Elegant Data Visualisations Using the Grammar of Graphics (original) (raw)
%+% +.gg
aes
Colour related aesthetics: colour, fill, and alpha
aes_colour_fill_alpha color colour fill
aes_eval after_scale after_stat from_theme stage stat
aes_group_order group
Differentiation related aesthetics: linetype, size, shape
aes_linetype_size_shape linetype shape size
Position related aesthetics: x, y, xmin, xmax, ymin, ymax, xend, yend
aes_position x xend xmax xmin y yend ymax ymin
annotate
annotation_custom
annotation_logticks
annotation_map
Annotation: high-performance rectangular tiling
annotation_raster
Create a ggplot layer appropriate to a particular data type
autolayer
Tailoring plots to particular data types
automatic_plotting
Create a complete ggplot appropriate to a particular data type
autoplot
borders
coord_cartesian
Cartesian coordinates with fixed "aspect ratio"
coord_equal coord_fixed
Cartesian coordinates with x and y flipped
coord_flip
coord_map coord_quickmap
coord_polar coord_radial
Transformed Cartesian coordinate system
coord_trans
CoordSf coord_sf GeomSf geom_sf geom_sf_label geom_sf_text ggsf StatSf stat_sf
Discretise numeric data into categorical
cut_interval cut_number cut_width
Prices of over 50,000 round cut diamonds
diamonds
draw_key draw_key_abline draw_key_blank draw_key_boxplot draw_key_crossbar draw_key_dotplot draw_key_label draw_key_linerange draw_key_path draw_key_point draw_key_pointrange draw_key_polygon draw_key_rect draw_key_smooth draw_key_text draw_key_timeseries draw_key_vline draw_key_vpath
economics economics_long
element_blank element_geom element_line element_point element_polygon element_rect element_text margin margin_auto margin_part rel
Expand the plot limits, using data
expand_limits
Generate expansion vector for scales
expand_scale expansion
facet_grid
Wrap a 1d ribbon of panels into 2d
facet_wrap
2d density estimate of Old Faithful data
faithfuld
fortify
Reference lines: horizontal, vertical, and diagonal
geom_abline geom_hline geom_vline
geom_bar geom_col stat_count
geom_bin2d geom_bin_2d stat_bin2d stat_bin_2d
geom_blank
A box and whiskers plot (in the style of Tukey)
geom_boxplot stat_boxplot
geom_contour geom_contour_filled stat_contour stat_contour_filled
geom_count stat_sum
Vertical intervals: lines, crossbars & errorbars
geom_crossbar geom_errorbar geom_errorbarh geom_linerange geom_pointrange
geom_density stat_density
Contours of a 2D density estimate
geom_density2d geom_density2d_filled geom_density_2d geom_density_2d_filled stat_density2d stat_density2d_filled stat_density_2d stat_density_2d_filled
geom_dotplot
Histograms and frequency polygons
geom_freqpoly geom_histogram stat_bin
Draw a function as a continuous curve
geom_function stat_function
Hexagonal heatmap of 2d bin counts
geom_hex stat_binhex stat_bin_hex
geom_jitter
geom_label geom_text
geom_map
geom_line geom_path geom_step
geom_point
geom_polygon
geom_qq geom_qq_line stat_qq stat_qq_line
geom_quantile stat_quantile
geom_raster geom_rect geom_tile
geom_area geom_ribbon stat_align
geom_rug
geom_curve geom_segment
geom_smooth stat_smooth
Line segments parameterised by location, direction and distance
geom_spoke stat_spoke
geom_violin stat_ydensity
alt_text get_alt_text
Get, set, and modify the active theme
%+replace% get_theme replace_theme set_theme theme_get theme_replace theme_set theme_update update_theme
ggplot
ggproto ggproto_parent
Save a ggplot (or other grid object) with sensible defaults
ggsave
theme_bw theme_classic theme_dark theme_gray theme_grey theme_light theme_linedraw theme_minimal theme_test theme_void
guide_axis
Axis with logarithmic tick marks
guide_axis_logticks
guide_axis_stack
guide_axis_theta
A binned version of guide_legend
guide_bins
guide_colorbar guide_colourbar
guide_colorsteps guide_coloursteps
guide_custom
guide_legend
guide_none
guides
A selection of summary functions from Hmisc
hmisc mean_cl_boot mean_cl_normal mean_sdl median_hilow
Label with mathematical expressions
label_bquote
Construct labelling specification
labeller
labellers label_both label_context label_parsed label_value label_wrap_gen
Modify axis, legend, and plot labels
get_labs ggtitle labs xlab ylab
layer_geoms
layer_positions
Layer statistical transformations
layer_stats
lims xlim ylim
luv_colours
Calculate mean and standard error of the mean
mean_se
midwest
Fuel economy data from 1999 to 2008 for 38 popular models of cars
mpg
An updated and expanded version of the mammals sleep dataset
msleep
Dodge overlapping objects side-to-side
position_dodge position_dodge2
position_identity
Jitter points to avoid overplotting
position_jitter
Simultaneously dodge and jitter
position_jitterdodge
position_nudge
Stack overlapping objects on top of each another
position_fill position_stack
Terms of 12 presidents from Eisenhower to Trump
presidential
plot.ggplot print.ggplot
Format or print a ggproto object
format.ggproto print.ggproto
qplot quickplot
Compute the "resolution" of a numeric vector
resolution
scale_alpha scale_alpha_binned scale_alpha_continuous scale_alpha_date scale_alpha_datetime scale_alpha_discrete scale_alpha_ordinal
Positional scales for binning continuous data (x & y)
scale_x_binned scale_y_binned
Sequential, diverging and qualitative colour scales from ColorBrewer
scale_color_brewer scale_color_distiller scale_color_fermenter scale_colour_brewer scale_colour_distiller scale_colour_fermenter scale_fill_brewer scale_fill_distiller scale_fill_fermenter
Continuous and binned colour scales
scale_color_binned scale_color_continuous scale_colour_binned scale_colour_continuous scale_fill_binned scale_fill_continuous
scale_color_discrete scale_colour_discrete scale_fill_discrete
scale_color_date scale_color_datetime scale_color_gradient scale_color_gradient2 scale_color_gradientn scale_colour_date scale_colour_datetime scale_colour_gradient scale_colour_gradient2 scale_colour_gradientn scale_fill_date scale_fill_datetime scale_fill_gradient scale_fill_gradient2 scale_fill_gradientn
scale_color_grey scale_colour_grey scale_fill_grey
Evenly spaced colours for discrete data
scale_color_hue scale_colour_hue scale_fill_hue
scale_color_steps scale_color_steps2 scale_color_stepsn scale_colour_steps scale_colour_steps2 scale_colour_stepsn scale_fill_steps scale_fill_steps2 scale_fill_stepsn
Viridis colour scales from viridisLite
scale_color_ordinal scale_color_viridis_b scale_color_viridis_c scale_color_viridis_d scale_colour_ordinal scale_colour_viridis_b scale_colour_viridis_c scale_colour_viridis_d scale_fill_ordinal scale_fill_viridis_b scale_fill_viridis_c scale_fill_viridis_d
Position scales for continuous data (x & y)
scale_x_continuous scale_x_log10 scale_x_reverse scale_x_sqrt scale_y_continuous scale_y_log10 scale_y_reverse scale_y_sqrt
Position scales for date/time data
scale_x_date scale_x_datetime scale_x_time scale_y_date scale_y_datetime scale_y_time
scale_alpha_identity scale_color_identity scale_colour_identity scale_continuous_identity scale_discrete_identity scale_fill_identity scale_linetype_identity scale_linewidth_identity scale_shape_identity scale_size_identity
scale_linetype scale_linetype_binned scale_linetype_continuous scale_linetype_discrete
scale_linewidth scale_linewidth_binned scale_linewidth_continuous scale_linewidth_date scale_linewidth_datetime scale_linewidth_discrete scale_linewidth_ordinal
Create your own discrete scale
scale_alpha_manual scale_color_manual scale_colour_manual scale_discrete_manual scale_fill_manual scale_linetype_manual scale_linewidth_manual scale_shape_manual scale_size_manual
scale_shape scale_shape_binned scale_shape_continuous scale_shape_discrete scale_shape_ordinal
scale_radius scale_size scale_size_area scale_size_binned scale_size_binned_area scale_size_continuous scale_size_date scale_size_datetime scale_size_discrete scale_size_ordinal
Position scales for discrete data
scale_x_discrete scale_y_discrete
Vector field of seal movements
seals
derive dup_axis sec_axis
stat_connect
Compute empirical cumulative distribution
stat_ecdf
stat_ellipse
stat_identity
Manually compute transformations
stat_manual
Extract coordinates from 'sf' objects
StatSfCoordinates stat_sf_coordinates
Bin and summarise in 2d (rectangle & hexagons)
stat_summary2d stat_summary_2d stat_summary_hex
Summarise y values at unique/binned x
stat_summary stat_summary_bin
stat_unique
subtheme theme_sub_axis theme_sub_axis_bottom theme_sub_axis_left theme_sub_axis_right theme_sub_axis_top theme_sub_axis_x theme_sub_axis_y theme_sub_legend theme_sub_panel theme_sub_plot theme_sub_strip
theme
txhousing
vars