gg_remove_ticks: Remove tick marks from a plot's axes

Description Usage Arguments Value Examples

Description

gg_remove_ticks can remove ticks on either the X or Y axes. By default, all tick marks are removed.

gg_remove_ticks_x removes tick marks from the X axis

gg_remove_ticks_y removes tick marks from the Y axis

Usage

1
2
3
4
5
gg_remove_ticks(plot = last_plot(), x = TRUE, y = TRUE)

gg_remove_ticks_x(plot = last_plot())

gg_remove_ticks_y(plot = last_plot())

Arguments

plot

A ggplot2 plot object. By default, the last plot displayed is used.

x

Whether or not to remove X-axis ticks (default: TRUE)

y

Whether or not to remove Y-axis ticks (default: TRUE)

Value

A modified ggplot2 plot

Examples

1
2
3
p <- ggplot(mtcars, aes(x = cyl, y = mpg)) +
    geom_point(shape = 1)
gg_remove_ticks(plot = p)

briandconnelly/ggplot2bdc documentation built on May 13, 2019, 5:13 a.m.