[Dplr-commits] r929 - in pkg/dplR: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Dec 24 00:12:17 CET 2014


Author: andybunn
Date: 2014-12-24 00:12:16 +0100 (Wed, 24 Dec 2014)
New Revision: 929

Modified:
   pkg/dplR/R/crn.plot.R
   pkg/dplR/man/crn.plot.Rd
Log:
small plot changes.

Modified: pkg/dplR/R/crn.plot.R
===================================================================
--- pkg/dplR/R/crn.plot.R	2014-12-23 20:31:53 UTC (rev 928)
+++ pkg/dplR/R/crn.plot.R	2014-12-23 23:12:16 UTC (rev 929)
@@ -1,14 +1,14 @@
 `plot.crn` <- function(x, ...){ crn.plot(crn=x, ...) }
 
 `crn.plot` <- function(crn, add.spline=FALSE, nyrs=NULL, f=0.5,
-                                       crn.line.col='grey50',
-                                       spline.line.col='red',
-                                       samp.depth.col='grey90',
-                                       samp.depth.border.col='grey80',
-                                       crn.lwd=1, spline.lwd=1.5,
-                                       abline.pos=1, abline.col='black',
-                                       abline.lty=1, abline.lwd=1,
-                                       ...) {
+                       crn.line.col='grey50',
+                       spline.line.col='red',
+                       samp.depth.col='grey90',
+                       samp.depth.border.col='grey80',
+                       crn.lwd=1, spline.lwd=1.5,
+                       abline.pos=1, abline.col='black',
+                       abline.lty=1, abline.lwd=1,
+                       ...) {
   if(!is.data.frame(crn)) stop("'crn' must be a data.frame")
 
   op <- par(no.readonly=TRUE) # Save par

Modified: pkg/dplR/man/crn.plot.Rd
===================================================================
--- pkg/dplR/man/crn.plot.Rd	2014-12-23 20:31:53 UTC (rev 928)
+++ pkg/dplR/man/crn.plot.Rd	2014-12-23 23:12:16 UTC (rev 929)
@@ -57,19 +57,18 @@
 }
 \examples{data(cana157)
 crn.plot(cana157,xlab='Year',ylab='RWI')
-plot(cana157,xlab='Year',ylab='RWI')
+plot(cana157,xlab='Year',ylab='RWI', main='Twisted Tree Heartrot Hill')
 # with added spline
 crn.plot(cana157,add.spline=TRUE, nyrs=32, xlab='Year',ylab='RWI')
 ## Without sample depth
 cana157.mod <- cana157
 cana157.mod$samp.depth <- NULL
 crn.plot(cana157.mod, add.spline = TRUE, xlab='Year',ylab='RWI')
-## With multiple chronologies
-data(gp.rwl)
-data(gp.po)
-gp.rwi <- cms(rwl = gp.rwl, po = gp.po)
-gp.crn <- chron(gp.rwi,prefix="GP",prewhiten=TRUE)
-crn.plot(gp.crn, add.spline = TRUE)
+## A raw ring-width chronology
+data(ca533)
+ca533.raw.crn <- chron(ca533, prefix = "CAM", prewhiten=TRUE)
+plot(ca533.raw.crn,abline.pos=NULL,ylab='mm',xlab='Year')  
+
 \dontrun{
   # not pretty - but illustrates the coloring options
   my.cols <- c("#3182BD","#9ECAE1","#DEEBF7","#31A354","#A1D99B","#E5F5E0")
@@ -80,11 +79,8 @@
              samp.depth.border.col=my.cols[2],
              abline.col=my.cols[1],
              crn.lwd=1.5,spline.lwd=3,
-             abline.lwd=1)
-  # a raw ring-width chronology
-  data(ca533)
-  ca533.raw.crn <- chron(ca533, prefix = "CAM")
-  crn.plot(ca533.raw.crn,abline.pos=NULL,ylab='mm')  
+             abline.lwd=1,
+             xlab="Year", ylab="RWI")
 }
 }
 \keyword{ hplot }



More information about the Dplr-commits mailing list