# NOT RUN {
library(stats)
library(utils)
data(ca533)
ca533.rwi <- detrend(rwl = ca533, method = "ModNegExp")
ca533.crn <- chron(ca533.rwi, prefix = "CAM", prewhiten = FALSE)
Years <- time(ca533.crn)
CAMstd <- ca533.crn[, 1]
out.wave <- morlet(y1 = CAMstd, x1 = Years, p2 = 9, dj = 0.1,
siglvl = 0.99)
wavelet.plot(out.wave, useRaster = NA)
# }
# NOT RUN {
## Alternative palette with better separation of colors
if (require(RColorBrewer)) {
## RColorBrewer (1.1.2) uses but does not import rgb()
library(grDevices)
wavelet.plot(out.wave, key.cols=rev(brewer.pal(10, "Spectral")),
useRaster = NA)
}
# }
# NOT RUN {
levs <- quantile(out.wave$Power, probs = c(0, 0.5, 0.75, 0.9, 0.99))
wavelet.plot(out.wave, wavelet.levels = levs, add.sig = FALSE,
key.cols = c("white", "green", "blue", "red"),
useRaster = NA)
# }
Run the code above in your browser using DataLab