Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions R/position-nudge.R
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,11 @@
#' ggplot(df, aes(x, y)) +
#' geom_point() +
#' geom_text(aes(label = y), nudge_y = -0.1)
#'
#' # For each text individually
#' ggplot(df, aes(x, y)) +
#' geom_point() +
#' geom_text(aes(label = y), nudge_y = c(-0.1, 0.1, -0.1, 0.1))
position_nudge <- function(x = NULL, y = NULL) {
ggproto(NULL, PositionNudge,
x = x,
Expand Down
Loading