Remove axis elements
theme_no_axes(
axes = "xy",
text = TRUE,
ticks = TRUE,
title = TRUE,
line = FALSE
)
A theme()
object.
Which axes elements should be removed? A string containing
one or more of "t"
, "l"
, "b"
, "r"
, "x"
, and "y"
.
If TRUE
, will remove the axis labels.
If TRUE
, will remove the axis ticks.
If TRUE
, will remove the axis title.
If TRUE
, will remove the axis line.
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