我现在正在使用extRemes
包进行极值分析,我想绘制结果的返回级别。我发现包中的默认plot
函数不好,例如,我无法设置行颜色,x标签和标题。我想知道我们是否可以在ggplot2
中执行此操作?
library(extRemes)
library(xts)
library(ismev)
library(ggplot2)
data(rain)
precipitation <- rain
Daily <- seq(as.Date('1914-01-01'),as.Date('1961-12-30'),by = 1)
precipitation_xts <- xts(precipitation,Daily)
ams <- apply.yearly(precipitation_xts, FUN=max)
ams_df <- fortify(ams)
colnames(ams_df)[1] <- "Date"
mle <- fevd(x=ams, data=ams_df, location.fun=~Date, method = "MLE", type="GEV")
plot(x=mle, type="rl",rperiods=c(5,50,100))