Learn R Programming

ggplot2bdc (version 0.3.2)

gg_remove_ticks: Remove tick marks from a plot's axes

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

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

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

Run the code above in your browser using DataLab