EVOLUTION-MANAGER
Edit File: position_nudge.html
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: Nudge points a fixed distance</title> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="stylesheet" type="text/css" href="R.css" /> </head><body> <table width="100%" summary="page for position_nudge {ggplot2}"><tr><td>position_nudge {ggplot2}</td><td style="text-align: right;">R Documentation</td></tr></table> <h2>Nudge points a fixed distance</h2> <h3>Description</h3> <p><code>position_nudge()</code> is generally useful for adjusting the position of items on discrete scales by a small amount. Nudging is built in to <code><a href="geom_text.html">geom_text()</a></code> because it's so useful for moving labels a small distance from what they're labelling. </p> <h3>Usage</h3> <pre> position_nudge(x = 0, y = 0) </pre> <h3>Arguments</h3> <table summary="R argblock"> <tr valign="top"><td><code>x, y</code></td> <td> <p>Amount of vertical and horizontal distance to move.</p> </td></tr> </table> <h3>See Also</h3> <p>Other position adjustments: <code><a href="position_dodge.html">position_dodge</a>()</code>, <code><a href="position_identity.html">position_identity</a>()</code>, <code><a href="position_jitterdodge.html">position_jitterdodge</a>()</code>, <code><a href="position_jitter.html">position_jitter</a>()</code>, <code><a href="position_stack.html">position_stack</a>()</code> </p> <h3>Examples</h3> <pre> 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)) # Or, in brief ggplot(df, aes(x, y)) + geom_point() + geom_text(aes(label = y), nudge_y = -0.1) </pre> <hr /><div style="text-align: center;">[Package <em>ggplot2</em> version 3.3.2 <a href="00Index.html">Index</a>]</div> </body></html>