| Title: | Publication-Quality 'ggplot2' Visualisation |
|---|---|
| Description: | Wrapper 'ggplot2' functions for publication-quality visualisation. Aligned with 'ggplot2' and 'tidyverse'. Covers much of what 'ggplot2' does. |
| Authors: | David Hodge [aut, cre, cph] (ORCID: <https://orcid.org/0000-0002-3868-7501>) |
| Maintainer: | David Hodge <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 30.0.0 |
| Built: | 2026-10-29 10:21:22 UTC |
| Source: | https://github.com/cran/ggblanket |
An area ggplot with geom_area() defaults for the geom, stat and position.
gg_area( data, ..., geom = "area", stat = "align", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_area( data, ..., geom = "area", stat = "align", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::economics |> gg_area( x = date, y = unemploy, ) ggplot2::economics_long |> gg_area( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_area( x = date, y = value01, facet = variable, )ggplot2::economics |> gg_area( x = date, y = unemploy, ) ggplot2::economics_long |> gg_area( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_area( x = date, y = value01, facet = variable, )
A bar ggplot with geom_bar() defaults for the geom, stat and position.
gg_bar( data, ..., geom = "bar", stat = "count", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_bar( data, ..., geom = "bar", stat = "count", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> gg_bar( x = color, ) ggplot2::diamonds |> gg_bar( x = color, fill = cut, position = ggplot2::position_dodge(), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> gg_bar( x = color, facet = cut, )ggplot2::diamonds |> gg_bar( x = color, ) ggplot2::diamonds |> gg_bar( x = color, fill = cut, position = ggplot2::position_dodge(), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> gg_bar( x = color, facet = cut, )
A bin2d ggplot with geom_bin2d() defaults for the geom, stat and position.
Note gg_bin2d defaults to colour = NA.
gg_bin2d( data, ..., geom = "bin2d", stat = "bin2d", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$count), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_bin2d( data, ..., geom = "bin2d", stat = "bin2d", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$count), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> gg_bin2d( x = carat, y = price, ) ggplot2::diamonds |> gg_bin2d( x = carat, y = price, facet = cut, )ggplot2::diamonds |> gg_bin2d( x = carat, y = price, ) ggplot2::diamonds |> gg_bin2d( x = carat, y = price, facet = cut, )
A blank ggplot with geom_blank() defaults for the geom, stat and position.
Note this is an all-purpose custom wrapper intended for use with any geom.
Defaults for fill, colour, linewidth, palettes etc. come from the theme, e.g.
via ggplot2::set_theme(). Use set_refine(), set_colour_blend() and
set_fill_blend() to set the remaining ggblanket-specific global options.
gg_blanket( data, ..., geom = "blank", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = NULL, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_blanket( data, ..., geom = "blank", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = NULL, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
gg_blanket( data = mtcars, geom = "point", x = wt, y = mpg, fill = hp, ) gg_blanket( data = mtcars, geom = "point", x = wt, y = mpg, fill = factor(cyl), facet = cyl, )gg_blanket( data = mtcars, geom = "point", x = wt, y = mpg, fill = hp, ) gg_blanket( data = mtcars, geom = "point", x = wt, y = mpg, fill = factor(cyl), facet = cyl, )
A boxplot ggplot with geom_boxplot() defaults for the geom, stat and position.
gg_boxplot( data, ..., geom = "boxplot", stat = "boxplot", position = ggplot2::position_dodge2(preserve = "single"), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_boxplot( data, ..., geom = "boxplot", stat = "boxplot", position = ggplot2::position_dodge2(preserve = "single"), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> gg_boxplot( x = color, y = carat, y_limits = c(0, NA), ) ggplot2::diamonds |> gg_boxplot( x = color, y = carat, fill = cut, y_limits = c(0, NA), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> gg_boxplot( x = color, y = carat, facet = ggplot2::vars(cut), y_limits = c(0, NA), )ggplot2::diamonds |> gg_boxplot( x = color, y = carat, y_limits = c(0, NA), ) ggplot2::diamonds |> gg_boxplot( x = color, y = carat, fill = cut, y_limits = c(0, NA), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> gg_boxplot( x = color, y = carat, facet = ggplot2::vars(cut), y_limits = c(0, NA), )
A col ggplot with geom_col() defaults for the geom, stat and position.
gg_col( data, ..., geom = "col", stat = "identity", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_col( data, ..., geom = "col", stat = "identity", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> dplyr::count(color) |> gg_col( x = color, y = n, ) ggplot2::diamonds |> dplyr::count(color, cut) |> gg_col( x = color, y = n, fill = cut, position = ggplot2::position_dodge(), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> dplyr::count(color, cut) |> gg_col( x = color, y = n, facet = cut, )ggplot2::diamonds |> dplyr::count(color) |> gg_col( x = color, y = n, ) ggplot2::diamonds |> dplyr::count(color, cut) |> gg_col( x = color, y = n, fill = cut, position = ggplot2::position_dodge(), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> dplyr::count(color, cut) |> gg_col( x = color, y = n, facet = cut, )
A contour ggplot with geom_contour() defaults for the geom, stat and position.
gg_contour( data, ..., geom = "contour", stat = "contour", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_contour( data, ..., geom = "contour", stat = "contour", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::faithfuld |> gg_contour( x = waiting, y = eruptions, z = density, )ggplot2::faithfuld |> gg_contour( x = waiting, y = eruptions, z = density, )
A contour filled ggplot with geom_contour_filled() defaults for the geom, stat and position.
Note gg_contour_filled defaults to colour = NA.
gg_contour_filled( data, ..., geom = "contour_filled", stat = "contour_filled", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$level), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_contour_filled( data, ..., geom = "contour_filled", stat = "contour_filled", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$level), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::faithfuld |> gg_contour_filled( x = waiting, y = eruptions, z = density, fill_palette = scales::pal_viridis(option = "turbo"), )ggplot2::faithfuld |> gg_contour_filled( x = waiting, y = eruptions, z = density, fill_palette = scales::pal_viridis(option = "turbo"), )
A crossbar ggplot with geom_crossbar() defaults for the geom, stat and position.
gg_crossbar( data, ..., geom = "crossbar", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_crossbar( data, ..., geom = "crossbar", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> dplyr::group_by(Species) |> dplyr::summarise( mean = mean(Sepal.Length), lower = mean(Sepal.Length) - sd(Sepal.Length), upper = mean(Sepal.Length) + sd(Sepal.Length), ) |> gg_crossbar( x = Species, y = mean, ymin = lower, ymax = upper, ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_crossbar( x = class, y = mean_hwy, ymin = lower, ymax = upper, fill = drv, position = ggplot2::position_dodge2(preserve = "single"), ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_crossbar( x = drv, y = mean_hwy, ymin = lower, ymax = upper, facet = class, )iris |> dplyr::group_by(Species) |> dplyr::summarise( mean = mean(Sepal.Length), lower = mean(Sepal.Length) - sd(Sepal.Length), upper = mean(Sepal.Length) + sd(Sepal.Length), ) |> gg_crossbar( x = Species, y = mean, ymin = lower, ymax = upper, ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_crossbar( x = class, y = mean_hwy, ymin = lower, ymax = upper, fill = drv, position = ggplot2::position_dodge2(preserve = "single"), ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_crossbar( x = drv, y = mean_hwy, ymin = lower, ymax = upper, facet = class, )
A density ggplot with geom_density() defaults for the geom, stat and position.
gg_density( data, ..., geom = "density", stat = "density", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_density( data, ..., geom = "density", stat = "density", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_density( x = Sepal.Width, ) iris |> gg_density( x = Sepal.Width, fill = Species, ) iris |> gg_density( x = Sepal.Width, facet = Species, )iris |> gg_density( x = Sepal.Width, ) iris |> gg_density( x = Sepal.Width, fill = Species, ) iris |> gg_density( x = Sepal.Width, facet = Species, )
A density 2d ggplot with geom_density_2d() defaults for the geom, stat and position.
gg_density2d( data, ..., geom = "density2d", stat = "density2d", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_density2d( data, ..., geom = "density2d", stat = "density2d", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_density2d( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_density2d( x = Sepal.Width, y = Sepal.Length, fill = Species, )iris |> gg_density2d( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_density2d( x = Sepal.Width, y = Sepal.Length, fill = Species, )
A density 2d filled ggplot with geom_density_2d_filled() defaults for the geom, stat and position.
Note gg_density2d_filled defaults to colour = NA.
gg_density2d_filled( data, ..., geom = "density2d_filled", stat = "density2d_filled", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$level), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_density2d_filled( data, ..., geom = "density2d_filled", stat = "density2d_filled", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$level), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_density2d_filled( x = Sepal.Width, y = Sepal.Length, fill_palette = scales::pal_viridis(option = "turbo"), ) iris |> gg_density2d_filled( x = Sepal.Width, y = Sepal.Length, facet = Species, fill_palette = scales::pal_viridis(option = "turbo"), )iris |> gg_density2d_filled( x = Sepal.Width, y = Sepal.Length, fill_palette = scales::pal_viridis(option = "turbo"), ) iris |> gg_density2d_filled( x = Sepal.Width, y = Sepal.Length, facet = Species, fill_palette = scales::pal_viridis(option = "turbo"), )
An errorbar ggplot with geom_errorbar() defaults for the geom, stat and position.
gg_errorbar( data, ..., geom = "errorbar", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_errorbar( data, ..., geom = "errorbar", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> dplyr::group_by(Species) |> dplyr::summarise( mean = mean(Sepal.Length), lower = mean(Sepal.Length) - sd(Sepal.Length), upper = mean(Sepal.Length) + sd(Sepal.Length), ) |> gg_errorbar( x = Species, y = mean, ymin = lower, ymax = upper, ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_errorbar( x = class, y = mean_hwy, ymin = lower, ymax = upper, fill = drv, position = ggplot2::position_dodge2(preserve = "single"), ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_errorbar( x = drv, y = mean_hwy, ymin = lower, ymax = upper, facet = class, )iris |> dplyr::group_by(Species) |> dplyr::summarise( mean = mean(Sepal.Length), lower = mean(Sepal.Length) - sd(Sepal.Length), upper = mean(Sepal.Length) + sd(Sepal.Length), ) |> gg_errorbar( x = Species, y = mean, ymin = lower, ymax = upper, ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_errorbar( x = class, y = mean_hwy, ymin = lower, ymax = upper, fill = drv, position = ggplot2::position_dodge2(preserve = "single"), ) ggplot2::mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean_hwy = mean(hwy), lower = mean_hwy - sd(hwy), upper = mean_hwy + sd(hwy), ) |> gg_errorbar( x = drv, y = mean_hwy, ymin = lower, ymax = upper, facet = class, )
A freqpoly ggplot with geom_freqpoly() defaults for the geom, stat and position.
gg_freqpoly( data, ..., geom = "freqpoly", stat = "bin", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_freqpoly( data, ..., geom = "freqpoly", stat = "bin", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> gg_freqpoly( x = carat, ) ggplot2::diamonds |> gg_freqpoly( x = carat, fill = cut, ) ggplot2::diamonds |> gg_freqpoly( x = carat, facet = cut, )ggplot2::diamonds |> gg_freqpoly( x = carat, ) ggplot2::diamonds |> gg_freqpoly( x = carat, fill = cut, ) ggplot2::diamonds |> gg_freqpoly( x = carat, facet = cut, )
A hex ggplot with geom_hex() defaults for the geom, stat and position.
Note gg_hex defaults to colour = NA.
gg_hex( data, ..., geom = "hex", stat = "binhex", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$count), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_hex( data, ..., geom = "hex", stat = "binhex", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = ggplot2::after_stat(.data$count), colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> gg_hex( x = carat, y = price, ) ggplot2::diamonds |> gg_hex( x = carat, y = price, facet = cut, )ggplot2::diamonds |> gg_hex( x = carat, y = price, ) ggplot2::diamonds |> gg_hex( x = carat, y = price, facet = cut, )
A histogram ggplot with geom_histogram() defaults for the geom, stat and position.
gg_histogram( data, ..., geom = "histogram", stat = "bin", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_histogram( data, ..., geom = "histogram", stat = "bin", position = ggplot2::position_stack(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_histogram( x = Sepal.Width, ) iris |> gg_histogram( x = Sepal.Width, fill = Species, ) iris |> gg_histogram( x = Sepal.Width, facet = Species, )iris |> gg_histogram( x = Sepal.Width, ) iris |> gg_histogram( x = Sepal.Width, fill = Species, ) iris |> gg_histogram( x = Sepal.Width, facet = Species, )
A jitter ggplot with geom_jitter() defaults for the geom, stat and position.
gg_jitter( data, ..., geom = "jitter", stat = "identity", position = ggplot2::position_jitter(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_jitter( data, ..., geom = "jitter", stat = "identity", position = ggplot2::position_jitter(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_jitter( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_jitter( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_jitter( x = Sepal.Width, y = Sepal.Length, facet = Species, )iris |> gg_jitter( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_jitter( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_jitter( x = Sepal.Width, y = Sepal.Length, facet = Species, )
A line ggplot with geom_line() defaults for the geom, stat and position.
gg_line( data, ..., geom = "line", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_line( data, ..., geom = "line", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
library(dplyr) library(ggplot2) ggplot2::economics |> gg_line( x = date, y = unemploy, y_limits = \(x) range(x, 0), ) ggplot2::economics_long |> gg_line( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_line( x = date, y = value01, facet = variable, ) ggplot2::economics_long |> group_by(variable) |> slice_head(n = 10) |> filter(variable != "psavert") |> gg_point( x = date, y = value01, fill = variable, before = geom_line(), )library(dplyr) library(ggplot2) ggplot2::economics |> gg_line( x = date, y = unemploy, y_limits = \(x) range(x, 0), ) ggplot2::economics_long |> gg_line( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_line( x = date, y = value01, facet = variable, ) ggplot2::economics_long |> group_by(variable) |> slice_head(n = 10) |> filter(variable != "psavert") |> gg_point( x = date, y = value01, fill = variable, before = geom_line(), )
A linerange ggplot with geom_linerange() defaults for the geom, stat and position.
gg_linerange( data, ..., geom = "linerange", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_linerange( data, ..., geom = "linerange", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
library(ggplot2) iris |> dplyr::group_by(Species) |> dplyr::summarise( mean = mean(Sepal.Length), lower = mean(Sepal.Length) - sd(Sepal.Length), upper = mean(Sepal.Length) + sd(Sepal.Length), ) |> gg_linerange( x = Species, y = mean, ymin = lower, ymax = upper, ) mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_linerange( x = class, ymin = lower, y = mean, ymax = upper, fill = drv, position = position_dodge2(width = 0.25), ) mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_linerange( x = drv, y = mean, ymin = lower, ymax = upper, facet = class, ) mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_point( x = class, ymin = lower, y = mean, ymax = upper, fill = drv, position = position_dodge2(width = 0.25), before = geom_linerange( position = position_dodge2(width = 0.25), ) ) penguins |> dplyr::count(species, sex) |> tidyr::drop_na() |> gg_point( x = species, y = n, fill = sex, position = position_dodge(width = 0.2), before = ggplot2::geom_linerange( aes(ymin = 0, ymax = n), position = position_dodge(width = 0.2), ), )library(ggplot2) iris |> dplyr::group_by(Species) |> dplyr::summarise( mean = mean(Sepal.Length), lower = mean(Sepal.Length) - sd(Sepal.Length), upper = mean(Sepal.Length) + sd(Sepal.Length), ) |> gg_linerange( x = Species, y = mean, ymin = lower, ymax = upper, ) mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_linerange( x = class, ymin = lower, y = mean, ymax = upper, fill = drv, position = position_dodge2(width = 0.25), ) mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_linerange( x = drv, y = mean, ymin = lower, ymax = upper, facet = class, ) mpg |> dplyr::group_by(class, drv) |> dplyr::summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_point( x = class, ymin = lower, y = mean, ymax = upper, fill = drv, position = position_dodge2(width = 0.25), before = geom_linerange( position = position_dodge2(width = 0.25), ) ) penguins |> dplyr::count(species, sex) |> tidyr::drop_na() |> gg_point( x = species, y = n, fill = sex, position = position_dodge(width = 0.2), before = ggplot2::geom_linerange( aes(ymin = 0, ymax = n), position = position_dodge(width = 0.2), ), )
A path ggplot with geom_path() defaults for the geom, stat and position.
gg_path( data, ..., geom = "path", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_path( data, ..., geom = "path", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
library(dplyr) library(ggplot2) ggplot2::economics |> gg_path( x = date, y = unemploy, y_limits = \(x) range(x, 0), ) ggplot2::economics_long |> gg_path( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_path( x = date, y = value01, facet = variable, ) ggplot2::economics_long |> group_by(variable) |> slice_head(n = 10) |> filter(variable != "psavert") |> gg_point( x = date, y = value01, fill = variable, before = geom_path(), )library(dplyr) library(ggplot2) ggplot2::economics |> gg_path( x = date, y = unemploy, y_limits = \(x) range(x, 0), ) ggplot2::economics_long |> gg_path( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_path( x = date, y = value01, facet = variable, ) ggplot2::economics_long |> group_by(variable) |> slice_head(n = 10) |> filter(variable != "psavert") |> gg_point( x = date, y = value01, fill = variable, before = geom_path(), )
A point ggplot with geom_point() defaults for the geom, stat and position.
gg_point( data, ..., geom = "point", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_point( data, ..., geom = "point", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
library(dplyr) library(ggplot2) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, facet = Species, ) mpg |> group_by(class, drv) |> summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_point( x = class, ymin = lower, y = mean, ymax = upper, fill = drv, position = position_dodge2(width = 0.25), before = geom_linerange( position = position_dodge2(width = 0.25), ) ) penguins |> count(species, sex) |> tidyr::drop_na() |> gg_point( x = species, y = n, fill = sex, position = position_dodge(width = 0.2), before = geom_linerange( aes(ymin = 0, ymax = n), position = position_dodge(width = 0.2), ), )library(dplyr) library(ggplot2) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, facet = Species, ) mpg |> group_by(class, drv) |> summarise( mean = mean(hwy), lower = mean - sd(hwy), upper = mean + sd(hwy), ) |> gg_point( x = class, ymin = lower, y = mean, ymax = upper, fill = drv, position = position_dodge2(width = 0.25), before = geom_linerange( position = position_dodge2(width = 0.25), ) ) penguins |> count(species, sex) |> tidyr::drop_na() |> gg_point( x = species, y = n, fill = sex, position = position_dodge(width = 0.2), before = geom_linerange( aes(ymin = 0, ymax = n), position = position_dodge(width = 0.2), ), )
A polygon ggplot with geom_polygon() defaults for the geom, stat and position.
gg_polygon( data, ..., geom = "polygon", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_polygon( data, ..., geom = "polygon", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
tibble::tibble( x = c(0, 1, 1, 0, 2, 3, 3, 2), y = c(0, 0, 1, 1, 0, 0, 1, 1), group = c("a", "a", "a", "a", "b", "b", "b", "b"), ) |> gg_polygon( x = x, y = y, group = group, ) tibble::tibble( x = c(0, 1, 1, 0, 2, 3, 3, 2), y = c(0, 0, 1, 1, 0, 0, 1, 1), group = c("a", "a", "a", "a", "b", "b", "b", "b"), ) |> gg_polygon( x = x, y = y, group = group, fill = group, ) tibble::tibble( x = c(0, 1, 1, 0, 2, 3, 3, 2), y = c(0, 0, 1, 1, 0, 0, 1, 1), group = c("a", "a", "a", "a", "b", "b", "b", "b"), ) |> gg_polygon( x = x, y = y, group = group, facet = group, )tibble::tibble( x = c(0, 1, 1, 0, 2, 3, 3, 2), y = c(0, 0, 1, 1, 0, 0, 1, 1), group = c("a", "a", "a", "a", "b", "b", "b", "b"), ) |> gg_polygon( x = x, y = y, group = group, ) tibble::tibble( x = c(0, 1, 1, 0, 2, 3, 3, 2), y = c(0, 0, 1, 1, 0, 0, 1, 1), group = c("a", "a", "a", "a", "b", "b", "b", "b"), ) |> gg_polygon( x = x, y = y, group = group, fill = group, ) tibble::tibble( x = c(0, 1, 1, 0, 2, 3, 3, 2), y = c(0, 0, 1, 1, 0, 0, 1, 1), group = c("a", "a", "a", "a", "b", "b", "b", "b"), ) |> gg_polygon( x = x, y = y, group = group, facet = group, )
A qq ggplot with geom_qq() defaults for the geom, stat and position. defaults for the geom, stat and position.
gg_qq( data, ..., geom = "qq", stat = "qq", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_qq( data, ..., geom = "qq", stat = "qq", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
library(ggplot2) iris |> gg_qq( sample = Sepal.Width, before = geom_qq_line() ) iris |> gg_qq( sample = Sepal.Width, fill = Species, before = geom_qq_line() ) iris |> gg_qq( sample = Sepal.Width, facet = Species, before = geom_qq_line() )library(ggplot2) iris |> gg_qq( sample = Sepal.Width, before = geom_qq_line() ) iris |> gg_qq( sample = Sepal.Width, fill = Species, before = geom_qq_line() ) iris |> gg_qq( sample = Sepal.Width, facet = Species, before = geom_qq_line() )
A quantile ggplot with geom_quantile() defaults for the geom, stat and position.
gg_quantile( data, ..., geom = "quantile", stat = "quantile", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_quantile( data, ..., geom = "quantile", stat = "quantile", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
if (requireNamespace("quantreg", quietly = TRUE)) { iris |> gg_quantile( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_quantile( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_quantile( x = Sepal.Width, y = Sepal.Length, facet = Species, ) }if (requireNamespace("quantreg", quietly = TRUE)) { iris |> gg_quantile( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_quantile( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_quantile( x = Sepal.Width, y = Sepal.Length, facet = Species, ) }
A raster ggplot with geom_raster() defaults for the geom, stat and position.
Note gg_raster defaults to colour = NA.
gg_raster( data, ..., geom = "raster", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_raster( data, ..., geom = "raster", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::faithfuld |> gg_raster( x = waiting, y = eruptions, fill = density, ) ggplot2::faithfuld |> gg_raster( x = waiting, y = eruptions, fill = density, ) ggplot2::faithfuld |> dplyr::mutate(group = ifelse(waiting <= 65, "short", "long")) |> gg_raster( x = waiting, y = eruptions, fill = density, facet = group, facet_scales = "free_x", )ggplot2::faithfuld |> gg_raster( x = waiting, y = eruptions, fill = density, ) ggplot2::faithfuld |> gg_raster( x = waiting, y = eruptions, fill = density, ) ggplot2::faithfuld |> dplyr::mutate(group = ifelse(waiting <= 65, "short", "long")) |> gg_raster( x = waiting, y = eruptions, fill = density, facet = group, facet_scales = "free_x", )
A rect ggplot with geom_rect() defaults for the geom, stat and position.
gg_rect( data, ..., geom = "rect", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_rect( data, ..., geom = "rect", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
tibble::tibble( xmin = c(1, 3), xmax = c(2, 4), ymin = c(1, 3), ymax = c(2, 4), ) |> gg_rect( xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, ) tibble::tibble( xmin = c(1, 3), xmax = c(2, 4), ymin = c(1, 3), ymax = c(2, 4), group = c("a", "b"), ) |> gg_rect( xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, fill = group, ) tibble::tibble( xmin = c(1, 3), xmax = c(2, 4), ymin = c(1, 3), ymax = c(2, 4), group = c("a", "b"), ) |> gg_rect( xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, facet = group, )tibble::tibble( xmin = c(1, 3), xmax = c(2, 4), ymin = c(1, 3), ymax = c(2, 4), ) |> gg_rect( xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, ) tibble::tibble( xmin = c(1, 3), xmax = c(2, 4), ymin = c(1, 3), ymax = c(2, 4), group = c("a", "b"), ) |> gg_rect( xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, fill = group, ) tibble::tibble( xmin = c(1, 3), xmax = c(2, 4), ymin = c(1, 3), ymax = c(2, 4), group = c("a", "b"), ) |> gg_rect( xmin = xmin, xmax = xmax, ymin = ymin, ymax = ymax, facet = group, )
A ribbon ggplot with geom_ribbon() defaults for the geom, stat and position.
gg_ribbon( data, ..., geom = "ribbon", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_ribbon( data, ..., geom = "ribbon", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
tibble::tibble(year = 1875:1972, level = as.vector(LakeHuron)) |> dplyr::mutate(lower = level - 1, upper = level + 1) |> gg_ribbon( x = year, ymin = lower, ymax = upper, x_labels = \(x) x, ) ggplot2::economics_long |> dplyr::mutate(lower = value01 - 0.05, upper = value01 + 0.05) |> gg_ribbon( x = date, ymin = lower, ymax = upper, fill = variable, ) ggplot2::economics_long |> dplyr::mutate(lower = value01 - 0.05, upper = value01 + 0.05) |> gg_ribbon( x = date, ymin = lower, ymax = upper, facet = variable, )tibble::tibble(year = 1875:1972, level = as.vector(LakeHuron)) |> dplyr::mutate(lower = level - 1, upper = level + 1) |> gg_ribbon( x = year, ymin = lower, ymax = upper, x_labels = \(x) x, ) ggplot2::economics_long |> dplyr::mutate(lower = value01 - 0.05, upper = value01 + 0.05) |> gg_ribbon( x = date, ymin = lower, ymax = upper, fill = variable, ) ggplot2::economics_long |> dplyr::mutate(lower = value01 - 0.05, upper = value01 + 0.05) |> gg_ribbon( x = date, ymin = lower, ymax = upper, facet = variable, )
A segment ggplot with geom_segment() defaults for the geom, stat and position.
gg_segment( data, ..., geom = "segment", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_segment( data, ..., geom = "segment", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_point( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, facet = Species, ) tibble::tibble( x = c(1, 3), xend = c(2, 4), y = c(1, 3), yend = c(2, 4), ) |> gg_segment( x = x, xend = xend, y = y, yend = yend, ) tibble::tibble( x = c(1, 3), xend = c(2, 4), y = c(1, 3), yend = c(2, 4), group = c("a", "b"), ) |> gg_segment( x = x, xend = xend, y = y, yend = yend, fill = group, ) tibble::tibble( x = c(1, 3), xend = c(2, 4), y = c(1, 3), yend = c(2, 4), group = c("a", "b"), ) |> gg_segment( x = x, xend = xend, y = y, yend = yend, facet = group, )iris |> gg_point( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_point( x = Sepal.Width, y = Sepal.Length, facet = Species, ) tibble::tibble( x = c(1, 3), xend = c(2, 4), y = c(1, 3), yend = c(2, 4), ) |> gg_segment( x = x, xend = xend, y = y, yend = yend, ) tibble::tibble( x = c(1, 3), xend = c(2, 4), y = c(1, 3), yend = c(2, 4), group = c("a", "b"), ) |> gg_segment( x = x, xend = xend, y = y, yend = yend, fill = group, ) tibble::tibble( x = c(1, 3), xend = c(2, 4), y = c(1, 3), yend = c(2, 4), group = c("a", "b"), ) |> gg_segment( x = x, xend = xend, y = y, yend = yend, facet = group, )
A sf ggplot with geom_sf() defaults for the geom, stat and position.
gg_sf( data, ..., geom = "sf", stat = "sf", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_sf( data, ..., geom = "sf", stat = "sf", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
if (requireNamespace("sf", quietly = TRUE)) { d <- sf::st_read(system.file("shape/nc.shp", package = "sf")) d |> sf::st_centroid() |> gg_sf() d |> gg_sf( fill = AREA, ) }if (requireNamespace("sf", quietly = TRUE)) { d <- sf::st_read(system.file("shape/nc.shp", package = "sf")) d |> sf::st_centroid() |> gg_sf() d |> gg_sf( fill = AREA, ) }
A smooth ggplot with geom_smooth() defaults for the geom, stat and position.
gg_smooth( data, ..., geom = "smooth", stat = "smooth", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_smooth( data, ..., geom = "smooth", stat = "smooth", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
iris |> gg_smooth( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_smooth( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_smooth( x = Sepal.Width, y = Sepal.Length, facet = Species, )iris |> gg_smooth( x = Sepal.Width, y = Sepal.Length, ) iris |> gg_smooth( x = Sepal.Width, y = Sepal.Length, fill = Species, ) iris |> gg_smooth( x = Sepal.Width, y = Sepal.Length, facet = Species, )
A spoke ggplot with geom_spoke() defaults for the geom, stat and position.
gg_spoke( data, ..., geom = "spoke", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_spoke( data, ..., geom = "spoke", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
expand.grid(x = 1:10, y = 1:10) |> tibble::as_tibble() |> dplyr::mutate( angle = runif(100, 0, 2 * pi), speed = runif(100, 0, sqrt(0.1 * x)), ) |> gg_spoke( x = x, y = y, angle = angle, radius = speed, ) expand.grid(x = 1:10, y = 1:10) |> tibble::as_tibble() |> dplyr::mutate( angle = runif(100, 0, 2 * pi), speed = runif(100, 0, sqrt(0.1 * x)), ) |> gg_spoke( x = x, y = y, angle = angle, radius = speed, fill = speed, ) expand.grid(x = 1:10, y = 1:10) |> tibble::as_tibble() |> dplyr::mutate( angle = runif(100, 0, 2 * pi), speed = runif(100, 0, sqrt(0.1 * x)), group = ifelse(x <= 5, "left", "right"), ) |> gg_spoke( x = x, y = y, angle = angle, radius = speed, facet = group, )expand.grid(x = 1:10, y = 1:10) |> tibble::as_tibble() |> dplyr::mutate( angle = runif(100, 0, 2 * pi), speed = runif(100, 0, sqrt(0.1 * x)), ) |> gg_spoke( x = x, y = y, angle = angle, radius = speed, ) expand.grid(x = 1:10, y = 1:10) |> tibble::as_tibble() |> dplyr::mutate( angle = runif(100, 0, 2 * pi), speed = runif(100, 0, sqrt(0.1 * x)), ) |> gg_spoke( x = x, y = y, angle = angle, radius = speed, fill = speed, ) expand.grid(x = 1:10, y = 1:10) |> tibble::as_tibble() |> dplyr::mutate( angle = runif(100, 0, 2 * pi), speed = runif(100, 0, sqrt(0.1 * x)), group = ifelse(x <= 5, "left", "right"), ) |> gg_spoke( x = x, y = y, angle = angle, radius = speed, facet = group, )
A step ggplot with geom_step() defaults for the geom, stat and position.
gg_step( data, ..., geom = "step", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_step( data, ..., geom = "step", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = FALSE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
library(dplyr) library(ggplot2) ggplot2::economics |> gg_step( x = date, y = unemploy, y_limits = \(x) range(x, 0), ) ggplot2::economics_long |> gg_step( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_step( x = date, y = value01, facet = ggplot2::vars(variable), ) ggplot2::economics_long |> group_by(variable) |> slice_head(n = 10) |> filter(variable != "psavert") |> gg_point( x = date, y = value01, fill = variable, before = geom_step(), )library(dplyr) library(ggplot2) ggplot2::economics |> gg_step( x = date, y = unemploy, y_limits = \(x) range(x, 0), ) ggplot2::economics_long |> gg_step( x = date, y = value01, fill = variable, ) ggplot2::economics_long |> gg_step( x = date, y = value01, facet = ggplot2::vars(variable), ) ggplot2::economics_long |> group_by(variable) |> slice_head(n = 10) |> filter(variable != "psavert") |> gg_point( x = date, y = value01, fill = variable, before = geom_step(), )
A tile ggplot with geom_tile() defaults for the geom, stat and position.
gg_tile( data, ..., geom = "tile", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_tile( data, ..., geom = "tile", stat = "identity", position = ggplot2::position_identity(), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::faithfuld |> gg_tile( x = waiting, y = eruptions, fill = density, colour = NA, ) ggplot2::faithfuld |> dplyr::mutate(group = ifelse(waiting <= 65, "short", "long")) |> gg_tile( x = waiting, y = eruptions, fill = density, facet = ggplot2::vars(group), facet_scales = "free_x", colour = NA, )ggplot2::faithfuld |> gg_tile( x = waiting, y = eruptions, fill = density, colour = NA, ) ggplot2::faithfuld |> dplyr::mutate(group = ifelse(waiting <= 65, "short", "long")) |> gg_tile( x = waiting, y = eruptions, fill = density, facet = ggplot2::vars(group), facet_scales = "free_x", colour = NA, )
A violin ggplot with geom_violin() defaults for the geom, stat and position.
gg_violin( data, ..., geom = "violin", stat = "ydensity", position = ggplot2::position_dodge(preserve = "single"), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )gg_violin( data, ..., geom = "violin", stat = "ydensity", position = ggplot2::position_dodge(preserve = "single"), before = NULL, with = NULL, polygon = TRUE, theme = NULL, refine = NULL, x = NULL, xmin = NULL, xmax = NULL, xend = NULL, xintercept = NULL, y = NULL, ymin = NULL, ymax = NULL, yend = NULL, yintercept = NULL, z = NULL, fill = NULL, colour = NULL, alpha = NULL, shape = NULL, linetype = NULL, linewidth = NULL, size = NULL, stroke = NULL, label = NULL, weight = NULL, group = NULL, width = NULL, height = NULL, slope = NULL, intercept = NULL, sample = NULL, angle = NULL, radius = NULL, mapping = ggplot2::aes(), x_type = NULL, x_subtype = NULL, x_breaks = NULL, x_drop = TRUE, x_expand = NULL, x_guide = ggplot2::waiver(), x_labels = NULL, x_limits = NULL, x_minor_breaks = ggplot2::waiver(), x_name = ggplot2::waiver(), x_oob = scales::oob_censor, x_palette = seq_len, x_position = "bottom", x_sec_axis = ggplot2::waiver(), x_transform = NULL, y_type = NULL, y_subtype = NULL, y_breaks = NULL, y_drop = TRUE, y_expand = NULL, y_guide = ggplot2::waiver(), y_labels = NULL, y_limits = NULL, y_minor_breaks = ggplot2::waiver(), y_name = ggplot2::waiver(), y_oob = scales::oob_censor, y_palette = seq_len, y_position = "left", y_sec_axis = ggplot2::waiver(), y_transform = NULL, fill_type = NULL, fill_subtype = NULL, fill_breaks = ggplot2::waiver(), fill_drop = TRUE, fill_guide = NULL, fill_labels = NULL, fill_limits = NULL, fill_name = ggplot2::waiver(), fill_oob = scales::oob_censor, fill_rescaler = scales::rescale, fill_palette = NULL, fill_transform = NULL, colour_type = NULL, colour_subtype = NULL, colour_breaks = NULL, colour_drop = NULL, colour_guide = NULL, colour_labels = NULL, colour_limits = NULL, colour_name = fill_name, colour_oob = NULL, colour_rescaler = NULL, colour_palette = NULL, colour_transform = NULL, alpha_type = NULL, alpha_subtype = NULL, alpha_breaks = ggplot2::waiver(), alpha_drop = TRUE, alpha_guide = NULL, alpha_labels = NULL, alpha_limits = NULL, alpha_name = ggplot2::waiver(), alpha_oob = scales::oob_censor, alpha_palette = NULL, alpha_transform = NULL, size_type = NULL, size_subtype = NULL, size_breaks = ggplot2::waiver(), size_drop = TRUE, size_guide = NULL, size_labels = NULL, size_limits = NULL, size_name = ggplot2::waiver(), size_oob = scales::oob_censor, size_palette = NULL, size_transform = NULL, linewidth_type = NULL, linewidth_subtype = NULL, linewidth_breaks = ggplot2::waiver(), linewidth_drop = TRUE, linewidth_guide = NULL, linewidth_labels = NULL, linewidth_limits = NULL, linewidth_name = ggplot2::waiver(), linewidth_oob = scales::oob_censor, linewidth_palette = NULL, linewidth_transform = NULL, linetype_type = NULL, linetype_breaks = ggplot2::waiver(), linetype_drop = TRUE, linetype_guide = NULL, linetype_labels = NULL, linetype_limits = NULL, linetype_name = ggplot2::waiver(), linetype_palette = NULL, shape_type = NULL, shape_breaks = ggplot2::waiver(), shape_drop = TRUE, shape_guide = NULL, shape_labels = NULL, shape_limits = NULL, shape_name = ggplot2::waiver(), shape_palette = NULL, facet = NULL, facet_rows = NULL, facet_cols = NULL, facet_axes = "margins", facet_axis_labels = "all", facet_drop = TRUE, facet_labeller = "label_value", facet_ncol = NULL, facet_nrow = NULL, facet_scales = "fixed", facet_space = "fixed", coord_xlim = NULL, coord_ylim = NULL, coord_clip = NULL, coord_reverse = "none", coord_ratio = NULL, title = NULL, subtitle = NULL, caption = NULL, ggplot = NULL )
data |
A data frame. |
... |
Arguments passed to the geom layer, including geom params. |
geom |
A geom as a string ( |
stat |
A stat as a string ( |
position |
A position as a function ( |
before |
A ggplot2 layer to add before the geom layer. Unaffected by polygon transformations. |
with |
A function to apply to the geom layer. |
polygon |
Whether to apply polygon colour and linewidth. |
theme |
A complete theme object. Defaults to the global theme set with |
refine |
A function with arguments discrete and orientation to refine the theme based on these. Defaults to that globally set with |
x |
Variable mapped to x. |
xmin |
Variable mapped to xmin. |
xmax |
Variable mapped to xmax. |
xend |
Variable mapped to xend. |
xintercept |
Variable mapped to xintercept. |
y |
Variable mapped to y. |
ymin |
Variable mapped to ymin. |
ymax |
Variable mapped to ymax. |
yend |
Variable mapped to yend. |
yintercept |
Variable mapped to yintercept. |
z |
Variable mapped to z. |
fill |
Variable mapped to fill, or a set value. When mapped, colour inherits the same mapping unless colour is specified separately. |
colour |
Variable mapped to colour, or a set value. When not specified and fill is mapped, colour inherits from fill. |
alpha |
Variable mapped to alpha, or a set value. |
shape |
Variable mapped to shape, or a set value. |
linetype |
Variable mapped to linetype, or a set value. |
linewidth |
Variable mapped to linewidth, or a set value. |
size |
Variable mapped to size, or a set value. |
stroke |
Variable mapped to stroke, or a set value. |
label |
Variable mapped to label, or a set value. |
weight |
Variable mapped to weight, or a set value. |
group |
Variable mapped to group, or a set value. |
width |
Variable mapped to width, or a set value. |
height |
Variable mapped to height, or a set value. |
slope |
Variable mapped to slope, or a set value. |
intercept |
Variable mapped to intercept, or a set value. |
sample |
Variable mapped to sample, or a set value. |
angle |
Variable mapped to angle, or a set value. |
radius |
Variable mapped to radius, or a set value. |
mapping |
Additional aesthetic mappings from |
x_type |
Scale type for x. One of |
x_subtype |
Scale subtype for x. One of |
x_breaks |
Breaks for the x scale. Defaults to |
x_drop |
Whether to drop unused levels for a discrete x scale. Defaults to |
x_expand |
Expansion for the x scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
x_guide |
Guide for the x scale. Defaults to |
x_labels |
Labels for the x scale. Defaults to |
x_limits |
Limits for the x scale. Accepts a vector or a function. |
x_minor_breaks |
Minor breaks for the x scale. |
x_name |
Name/title for the x scale. Defaults to |
x_oob |
Out-of-bounds handler for the x scale. Defaults to scales::oob_censor. |
x_palette |
Palette for a discrete x scale. Defaults to |
x_position |
Position of the x axis. Either |
x_sec_axis |
Secondary axis for x. Defaults to |
x_transform |
Transform for the x scale. Auto-detected from subtype if |
y_type |
Scale type for y. One of |
y_subtype |
Scale subtype for y. One of |
y_breaks |
Breaks for the y scale. Defaults to |
y_drop |
Whether to drop unused levels for a discrete y scale. Defaults to |
y_expand |
Expansion for the y scale. Defaults to zero expansion where the limit is zero, otherwise 5% expansion. |
y_guide |
Guide for the y scale. Defaults to |
y_labels |
Labels for the y scale. Defaults to |
y_limits |
Limits for the y scale. Accepts a vector or a function. |
y_minor_breaks |
Minor breaks for the y scale. |
y_name |
Name/title for the y scale. Defaults to |
y_oob |
Out-of-bounds handler for the y scale. Defaults to scales::oob_censor. |
y_palette |
Palette for a discrete y scale. Defaults to |
y_position |
Position of the y axis. Either |
y_sec_axis |
Secondary axis for y. Defaults to |
y_transform |
Transform for the y scale. Auto-detected from subtype if |
fill_type |
Scale type for fill. One of |
fill_subtype |
Scale subtype for fill. Auto-detected if |
fill_breaks |
Breaks for the fill scale. |
fill_drop |
Whether to drop unused levels for a discrete fill scale. Defaults to |
fill_guide |
Guide for the fill scale. |
fill_labels |
Labels for the fill scale. |
fill_limits |
Limits for the fill scale. |
fill_name |
Name/title for the fill scale. |
fill_oob |
Out-of-bounds handler for the fill scale. Defaults to scales::oob_censor. |
fill_rescaler |
Rescaler for the fill scale. Defaults to scales::rescale. |
fill_palette |
Palette for the fill scale. |
fill_transform |
Transform for the fill scale. Auto-detected from subtype if |
colour_type |
Scale type for colour. Inherits from |
colour_subtype |
Scale subtype for colour. Inherits from |
colour_breaks |
Breaks for the colour scale. Inherits from |
colour_drop |
Whether to drop unused levels for a discrete colour scale. Inherits from |
colour_guide |
Guide for the colour scale. Inherits from |
colour_labels |
Labels for the colour scale. Inherits from |
colour_limits |
Limits for the colour scale. Inherits from |
colour_name |
Name/title for the colour scale. Inherits from |
colour_oob |
Out-of-bounds handler for the colour scale. Inherits from |
colour_rescaler |
Rescaler for the colour scale. Inherits from |
colour_palette |
Palette for the colour scale. |
colour_transform |
Transform for the colour scale. Inherits from |
alpha_type |
Scale type for alpha. One of |
alpha_subtype |
Scale subtype for alpha. Auto-detected if |
alpha_breaks |
Breaks for the alpha scale. |
alpha_drop |
Whether to drop unused levels for a discrete alpha scale. Defaults to |
alpha_guide |
Guide for the alpha scale. Defaults to |
alpha_labels |
Labels for the alpha scale. |
alpha_limits |
Limits for the alpha scale. |
alpha_name |
Name/title for the alpha scale. |
alpha_oob |
Out-of-bounds handler for the alpha scale. Defaults to scales::oob_censor. |
alpha_palette |
Palette for the alpha scale. |
alpha_transform |
Transform for the alpha scale. |
size_type |
Scale type for size. One of |
size_subtype |
Scale subtype for size. Auto-detected if |
size_breaks |
Breaks for the size scale. |
size_drop |
Whether to drop unused levels for a discrete size scale. Defaults to |
size_guide |
Guide for the size scale. Defaults to |
size_labels |
Labels for the size scale. |
size_limits |
Limits for the size scale. |
size_name |
Name/title for the size scale. |
size_oob |
Out-of-bounds handler for the size scale. Defaults to scales::oob_censor. |
size_palette |
Palette for the size scale. |
size_transform |
Transform for the size scale. |
linewidth_type |
Scale type for linewidth. One of |
linewidth_subtype |
Scale subtype for linewidth. Auto-detected if |
linewidth_breaks |
Breaks for the linewidth scale. |
linewidth_drop |
Whether to drop unused levels for a discrete linewidth scale. Defaults to |
linewidth_guide |
Guide for the linewidth scale. Defaults to |
linewidth_labels |
Labels for the linewidth scale. |
linewidth_limits |
Limits for the linewidth scale. |
linewidth_name |
Name/title for the linewidth scale. |
linewidth_oob |
Out-of-bounds handler for the linewidth scale. Defaults to scales::oob_censor. |
linewidth_palette |
Palette for the linewidth scale. |
linewidth_transform |
Transform for the linewidth scale. |
linetype_type |
Scale type for linetype. Only |
linetype_breaks |
Breaks for the linetype scale. |
linetype_drop |
Whether to drop unused levels for the linetype scale. Defaults to |
linetype_guide |
Guide for the linetype scale. Defaults to |
linetype_labels |
Labels for the linetype scale. |
linetype_limits |
Limits for the linetype scale. |
linetype_name |
Name/title for the linetype scale. |
linetype_palette |
Palette for the linetype scale. |
shape_type |
Scale type for shape. Only |
shape_breaks |
Breaks for the shape scale. |
shape_drop |
Whether to drop unused levels for the shape scale. Defaults to |
shape_guide |
Guide for the shape scale. Defaults to |
shape_labels |
Labels for the shape scale. |
shape_limits |
Limits for the shape scale. |
shape_name |
Name/title for the shape scale. |
shape_palette |
Palette for the shape scale. |
facet |
Variables to facet by, passed to |
facet_rows |
Row variables for |
facet_cols |
Column variables for |
facet_axes |
Which axes to draw on facet panels. Defaults to |
facet_axis_labels |
Which axis labels to draw on facet panels. Defaults to |
facet_drop |
Whether to drop unused factor levels in facets. Defaults to |
facet_labeller |
Labeller for facet strip labels. Defaults to |
facet_ncol |
Number of columns for |
facet_nrow |
Number of rows for |
facet_scales |
Whether facet scales are fixed or free. Defaults to |
facet_space |
Whether facet space is fixed or free. Defaults to |
coord_xlim, coord_ylim
|
Zoom limits within the coordinate system. |
coord_clip |
Whether drawing is clipped to the panel. Either |
coord_reverse |
Which axes to reverse. One of |
coord_ratio |
Aspect ratio expressed as y / x, for |
title |
Plot title passed to |
subtitle |
Plot subtitle passed to |
caption |
Plot caption passed to |
ggplot |
A base ggplot object to use. Defaults to |
A ggplot object.
ggplot2::diamonds |> gg_violin( x = color, y = carat, y_limits = c(0, NA), ) ggplot2::diamonds |> gg_violin( x = color, y = carat, fill = cut, y_limits = c(0, NA), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> gg_violin( x = color, y = carat, facet = ggplot2::vars(cut), y_limits = c(0, NA), )ggplot2::diamonds |> gg_violin( x = color, y = carat, y_limits = c(0, NA), ) ggplot2::diamonds |> gg_violin( x = color, y = carat, fill = cut, y_limits = c(0, NA), ) ggplot2::diamonds |> dplyr::filter(cut %in% c("Premium", "Ideal")) |> gg_violin( x = color, y = carat, facet = ggplot2::vars(cut), y_limits = c(0, NA), )
When polygon = TRUE, colour_blend is a function applied to the fill
and fill_palette to derive the colour. Only one of the colour blend and
fill blend can be active: setting a non-NULL colour blend clears any fill
blend (last call wins), and the fill blend then defaults to identity.
set_colour_blend(new = NULL)set_colour_blend(new = NULL)
new |
A function of one argument (a colour vector), e.g.
|
Invisibly, the previous value of the option.
set_colour_blend(\(x) blends::multiply(x))set_colour_blend(\(x) blends::multiply(x))
When polygon = TRUE, fill_blend is a function applied to the colour
and colour_palette to derive the fill. Only one of the colour blend and
fill blend can be active: setting a non-NULL fill blend clears any colour
blend (last call wins), and the colour blend then defaults to identity.
set_fill_blend(new = NULL)set_fill_blend(new = NULL)
new |
A function of one argument (a colour vector), e.g.
|
Invisibly, the previous value of the option.
set_fill_blend(\(x) scales::alpha(x, 0.75))set_fill_blend(\(x) scales::alpha(x, 0.75))
set_refine() sets a global function that refines the theme depending on
the plot's scale types. All other defaults (fill, colour, linewidth,
palettes, etc.) are controlled through the theme, e.g. with
ggplot2::set_theme(), ggplot2::theme() and ggplot2::element_geom().
set_refine(new = NULL)set_refine(new = NULL)
new |
A function with arguments |
Invisibly, the previous value of the option.
set_refine(\(discrete, orientation) refine_axis_grid(discrete, orientation))set_refine(\(discrete, orientation) refine_axis_grid(discrete, orientation))