data("mpg", package = "ggplot2")
# Hide Y-axis and gridelines
apex(
data = mpg,
mapping = aes(x = manufacturer)
) %>%
ax_grid(show = FALSE)
# just grid lines
apex(
data = mpg,
mapping = aes(x = manufacturer)
) %>%
ax_grid(yaxis = list(lines = list(show = FALSE)))
# both x & y
data("economics", package = "ggplot2")
apex(
data = economics,
mapping = aes(x = date, y = psavert),
type = "line"
) %>%
ax_grid(
yaxis = list(lines = list(show = TRUE)),
xaxis = list(lines = list(show = TRUE))
)
Run the code above in your browser using DataLab