Closed
Description
ggplot2 adds backticks around variable labels if those variables contain a space and the aesthetics are defined in the geom and not globally.
No backticks:
library(ggplot2)
data <- tibble::tibble(
"variable with space" = 1:5
)
ggplot(data) +
aes(x = `variable with space`, y = `variable with space`) +
geom_point()
Created on 2019-03-14 by the reprex package (v0.2.1)
Backticks:
library(ggplot2)
data <- tibble::tibble(
"variable with space" = 1:5
)
ggplot(data) +
geom_point(aes(x = `variable with space`, y = `variable with space`))
Created on 2019-03-14 by the reprex package (v0.2.1)
Metadata
Metadata
Assignees
Labels
No labels