position_nudge

0th

Percentile

Nudge points.

This is useful if you want to nudge labels a little ways from their points.

Usage
position_nudge(x = 0, y = 0)
Arguments
x, y
Amount of vertical and horizontal distance to move.
See Also

Other position adjustments: position_dodge, position_fill, position_identity, position_jitterdodge, position_jitter

Aliases
  • position_nudge
Examples
df <- data.frame(
  x = c(1,3,2,5),
  y = c("a","c","d","c")
)

ggplot(df, aes(x, y)) +
  geom_point() +
  geom_text(aes(label = y))

ggplot(df, aes(x, y)) +
  geom_point() +
  geom_text(aes(label = y), position = position_nudge(y = -0.1))
Documentation reproduced from package ggplot2, version 2.1.0, License: GPL-2

Community examples

Looks like there are no examples yet.