scale_xy_ticks | R Documentation |
Change the x and y axis ticks of ggplot
scale_xy_ticks(gplot, xBreaks = NULL, yBreaks = NULL)
gplot |
a ggplot object. |
xBreaks |
the x axis ticks. |
yBreaks |
the y axis ticks. |
a ggplot object with changed x and y axis ticks.
## Not run:
dat = data.frame(x = rnorm(100), y = rnorm(100))
g = ggplot(dat, aes(x,y)) +
geom_point()
scale_xy_ticks(g, pretty(dat$x, n = 10), pretty(dat$y, n = 10))
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.