position-vertical: Vertical Positions

position_dodgevR Documentation

Vertical Positions

Description

Vertical versions of position_dodge(), position_jitterdodge(), position_fill(), position_stack(),

Usage

position_dodgev(height = NULL, preserve = c("total", "single"))

position_dodge2v(
  height = NULL,
  preserve = c("single", "total"),
  padding = 0.1,
  reverse = TRUE
)

position_jitterdodgev(
  jitter.height = NULL,
  jitter.width = 0,
  dodge.height = 0.75,
  seed = NA
)

position_stackv(hjust = 1, reverse = FALSE)

position_fillv()

Arguments

height

Dodging height, when different to the height of the individual elements. This is useful when you want to align narrow geoms with taller geoms.

preserve

Should dodging preserve the total width of all elements at a position, or the width of a single element?

padding

Padding between elements at the same position. Elements are shrunk by this proportion to allow space between them. Defaults to 0.1.

reverse

If TRUE, will reverse the default stacking order. This is useful if you're rotating both the plot and legend.

jitter.height

degree of jitter in y direction. Defaults to 0.

jitter.width

degree of jitter in x direction. Defaults to 40% of the resolution of the data.

dodge.height

the amount to dodge in the y direction. Defaults to 0.75, the default position_dodgev() height.

seed

A random seed to make the jitter reproducible. Useful if you need to apply the same jitter twice, e.g., for a point and a corresponding label. The random seed is reset after jittering. If NA (the default value), the seed is initialised with a random value; this makes sure that two subsequent calls start with a different seed. Use NULL to use the current random seed and also avoid resetting (the behaviour of ggplot 2.2.1 and earlier).

hjust

Horizontal adjustment for geoms that have a position (like points or lines), not a dimension (like bars or areas). Set to '0' to align with the left side, '0.5' for the middle, and '1' (the default) for the right side.


ggstance documentation built on May 29, 2024, 8:20 a.m.