Description Usage Arguments Value
This function creates vertical and horizontal axes that may be added to a ggplot object. The intercepts for either or each may be specified. Note the axes will not appear if they fall outside the limits of your plot. This function is partly based on this StackOverflow post: https://stackoverflow.com/questions/17753101/center-x-and-y-axis-with-ggplot2
1 | make_axes(p, x_int = 0, y_int = 0)
|
p |
A ggplot object |
x_int |
X-intercept of the y-axis. Defaults to 0 |
y_int |
Y-intercept of the x-axis. Defaults to 0. |
A list of four geom_segment objects, each corresponding to one half-axis, that may be added to a ggplot object.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.