Learn R Programming

ggalign (version 1.0.1)

theme_no_axes: Remove axis elements

Description

Remove axis elements

Usage

theme_no_axes(
  axes = "xy",
  text = TRUE,
  ticks = TRUE,
  title = TRUE,
  line = FALSE
)

Value

A theme() object.

Arguments

axes

Which axes elements should be removed? A string containing one or more of "t", "l", "b", "r", "x", and "y".

text

If TRUE, will remove the axis labels.

ticks

If TRUE, will remove the axis ticks.

title

If TRUE, will remove the axis title.

line

If TRUE, will remove the axis line.

Examples

Run this code
p <- ggplot() +
    geom_point(aes(x = wt, y = qsec), data = mtcars)
p + theme_no_axes()
p + theme_no_axes("b")
p + theme_no_axes("l")

Run the code above in your browser using DataLab