ropenair

Changing language of season titles of pollutionRose from R Openair


I made a plot for season (summer, spring, autumn and winter) using pollutionRose from the openair package. Here is the code:

library(openair)
Sys.setlocale("LC_TIME", "Portuguese")
pollutionRose(ASS_SO2, pollutant = "SO2", type ="season", cols="jet", main=expression(paste("ASS-SO"[2]*" (µg/ "* m^3* ")")))

I could´t change the language from english to portuguese with Sys.Setlocale in each season plot. How I can modify this? Thanks!


Solution

  • You can sort according to the season and then change the labels manually.

    library(openair)
    ASS_SO2_new <- cutData(ASS_SO2, type = "season")
    levels(ASS_SO2_new$season) <- c("primavera", "verao", "cair", "inverno")
    pollutionRose(ASS_SO2_new, pollutant = "SO2", type ="season", cols="jet", main=expression(paste("ASS-SO"[2]*" (µg/ "* m^3* ")")))