[Dplr-commits] r1109 - pkg/dplR/man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu May 24 08:18:17 CEST 2018
Author: andybunn
Date: 2018-05-24 08:18:17 +0200 (Thu, 24 May 2018)
New Revision: 1109
Modified:
pkg/dplR/man/wavelet.plot.Rd
Log:
clean up colors for wavelet plot
Modified: pkg/dplR/man/wavelet.plot.Rd
===================================================================
--- pkg/dplR/man/wavelet.plot.Rd 2018-05-24 06:05:53 UTC (rev 1108)
+++ pkg/dplR/man/wavelet.plot.Rd 2018-05-24 06:18:17 UTC (rev 1109)
@@ -104,18 +104,14 @@
out.wave <- morlet(y1 = CAMstd, x1 = Years, p2 = 9, dj = 0.1,
siglvl = 0.99)
wavelet.plot(out.wave, useRaster = NA)
-\dontrun{
-## 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)
-}
-}
+# Alternative palette with better separation of colors
+# via: rev(RColorBrewer::brewer.pal(10, "Spectral"))
+specCols <- c("#5E4FA2", "#3288BD", "#66C2A5", "#ABDDA4", "#E6F598", "#FEE08B", "#FDAE61", "#F46D43", "#D53E4F", "#9E0142")
+wavelet.plot(out.wave, key.cols=specCols,useRaster = NA)
+
+# fewer colors
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)
+ key.cols = c("#FFFFFF", "#ABDDA4", "#FDAE61", "#D7191C"), useRaster = NA)
}
\keyword{ hplot }
More information about the Dplr-commits
mailing list