scale_xy_ticks: Change the x and y axis ticks of ggplot

View source: R/themes.R

scale_xy_ticksR Documentation

Change the x and y axis ticks of ggplot

Description

Change the x and y axis ticks of ggplot

Usage

scale_xy_ticks(gplot, xBreaks = NULL, yBreaks = NULL)

Arguments

gplot

a ggplot object.

xBreaks

the x axis ticks.

yBreaks

the y axis ticks.

Value

a ggplot object with changed x and y axis ticks.

Examples

## 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)

paodan/funcTools documentation built on April 1, 2024, 12:01 a.m.