| get_width | R Documentation |
ggplot2 geom widthStandardise the width in ggplot2 geoms so that widths appear visually
consistent across plots with different numbers of categories, panel dimensions,
and orientations.
This can be used in geoms such as ggplot2::geom_bar(),
ggplot2::geom_col(), ggplot2::geom_boxplot(),
and ggplot2::geom_errorbar().
The relevant panel dimension must be an absolute physical unit (for example
grid::unit(..., "mm")), either supplied directly or set in the current theme.
Relative units are not supported.
get_width(
...,
n = NULL,
n_dodge = NULL,
orientation = c("x", "y"),
value = NULL,
panel_widths = NULL,
panel_heights = NULL
)
... |
Must be empty. Forces all other arguments to be named and allows trailing commas. |
n |
Number of categories in the orientation aesthetic (that is, |
n_dodge |
Number of dodge categories. Intended for use with
|
orientation |
Orientation: |
value |
Numeric scaling factor controlling apparent width. A value of
|
panel_widths |
A |
panel_heights |
A |
A single numeric width suitable for the width argument of geoms such
as ggplot2::geom_bar() or ggplot2::geom_col().
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.