I’m making a plot of air quality in Delta Junction, Alaska and am trying to add a title to my figure that says “Delta Junction Air Quality Index” but the Delta part of the title gets converted to the delta symbol and I can’t figure out how to keep it from doing that.
I’m using the openair package to create this plot. My example code below also uses lubridate to create a date column of the airquality built in dataset.
I first tried just using main = “Delta Junction Air Quality Index”
test <- as.data.frame(airquality)
test$date <- NA
test$date <- paste(test$Month,"-",test$Day,"- 2024")
test$date <- mdy(test$date)
calendarPlot(test,
pollutant = "Ozone",
month = 5,
statistic = "mean",
annotate = "value",
main = "Delta Junction Air Quality Index")
This is what the resulting plot looked like:
I also tried specifying a title as it’s own object to no avail.
title = "Delta Junction Air Quality Index"
test <- as.data.frame(airquality)
test$date <- NA
test$date <- paste(test$Month,"-",test$Day,"- 2024")
test$date <- mdy(test$date)
calendarPlot(test,
pollutant = "Ozone",
month = 5,
statistic = "mean",
annotate = "value",
main = title)
I then tried the below code which did keep Delta spelled out but added asterisks * around the word:
test <- as.data.frame(airquality)
test$date <- NA
test$date <- paste(test$Month,"-",test$Day,"- 2024")
test$date <- mdy(test$date)
calendarPlot(test,
pollutant = "Ozone",
month = 5,
statistic = "mean",
annotate = "value",
main = "'Delta' Junction Air Quality Index")