
Last chance! 50% off unlimited learning
Sale ends in
position_nudge(x = 0, y = 0)
position_dodge
,
position_fill
,
position_identity
,
position_jitterdodge
,
position_jitter
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))
Run the code above in your browser using DataLab