calendarPlot

library(openair)
library("dplyr")

Sys.setlocale("LC_TIME", "english")
breaks <- c(0,20,40,60,80,100)
labels <- c("优","良","轻度","中度","重度")
colors <- c("#009966","#ffde33","#ff9933","#cc0033","#660099")
mydata <-read.csv("./data.csv", header = TRUE)
mydata$date<-as.POSIXct(mydata$date)
mydata$num<-as.integer(mydata$num)
calendarPlot(mydata,pollutant = 'num',year = 2017,breaks =breaks,labels = labels,cols = colors,remove.empty = FALSE)

你可能感兴趣的:(calendarPlot)