[Analogue-commits] r187 - in pkg: R inst man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Sun Jul 4 14:16:56 CEST 2010
Author: gsimpson
Date: 2010-07-04 14:16:55 +0200 (Sun, 04 Jul 2010)
New Revision: 187
Modified:
pkg/R/panel.Stratiplot.R
pkg/inst/ChangeLog
pkg/man/panel.Stratiplot.Rd
Log:
Add's handling of drawing zone markers to panels on stratigraphic plots.
Modified: pkg/R/panel.Stratiplot.R
===================================================================
--- pkg/R/panel.Stratiplot.R 2010-07-04 11:21:42 UTC (rev 186)
+++ pkg/R/panel.Stratiplot.R 2010-07-04 12:16:55 UTC (rev 187)
@@ -12,6 +12,10 @@
lty.smooth = plot.line$lty,
lwd.smooth = 2,
fill = plot.symbol$fill,
+ zones = NULL,
+ col.zones = plot.line$col,
+ lty.zones = plot.line$lty,
+ lwd.zones = plot.line$lwd,
...) {
if (all(is.na(x) | is.na(y)))
return()
@@ -47,4 +51,7 @@
if("smooth" %in% type)
panel.Loess(x, y, col = col.smooth, lwd = lwd.smooth,
lty = lty.smooth, ...)
+ if(!is.null(zones) && is.numeric(zones))
+ panel.abline(h = zones, col = col.zones, lwd = lwd.zones,
+ lty = lty.zones, ...)
}
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2010-07-04 11:21:42 UTC (rev 186)
+++ pkg/inst/ChangeLog 2010-07-04 12:16:55 UTC (rev 187)
@@ -15,6 +15,12 @@
Bug in computing length of variable labels when 'strip = FALSE'
now fixed.
+ * panel.Stratiplot: Add capability to draw zones on stratigraphic
+ plots via new argument 'zones' which takes the numeric levels of
+ the zone boundaries on the scale of the plot y-axis. How the
+ zone markers are drawn can be controlled via several graphical
+ parameters. See ?panel.Stratiplot.
+
* chooseTaxa: Explicitly preserves row and column names.
* DESCRIPTION: prematurely added princurve as a dependency in
Modified: pkg/man/panel.Stratiplot.Rd
===================================================================
--- pkg/man/panel.Stratiplot.Rd 2010-07-04 11:21:42 UTC (rev 186)
+++ pkg/man/panel.Stratiplot.Rd 2010-07-04 12:16:55 UTC (rev 187)
@@ -23,6 +23,10 @@
lty.smooth = plot.line$lty,
lwd.smooth = 2,
fill = plot.symbol$fill,
+ zones = NULL,
+ col.zones = plot.line$col,
+ lty.zones = plot.line$lty,
+ lwd.zones = plot.line$lwd,
\dots)
}
%- maybe also 'usage' for other objects documented here.
@@ -53,7 +57,7 @@
For \code{"poly"}, a shaded polygon, or silhouette, is drawn for each
panel.}
\item{col, col.line, col.symbol, col.poly, col.refline,
- col.smooth}{colour parameters. For all but \code{col.smooth},
+ col.smooth, col.zones}{colour parameters. For all but \code{col.smooth},
default colours are obtained from \code{plot.symbol} and
\code{plot.line} using
\code{\link[lattice]{trellis.par.get}}. \code{col.refline} controls the
@@ -65,6 +69,10 @@
obtained from \code{plot.line} using
\code{\link[lattice]{trellis.par.get}}.}
\item{lwd.smooth}{The line width for the loess smoother.}
+ \item{zones}{numeric; vector of zone boundary positions on scale of
+ the depth/time (y-)axis.}
+ \item{lty.zones, lwd.zones}{line type and width for the zone
+ markers. The defaults are obtained from \code{plot.line}.}
\item{\dots}{extra arguments passed on to the underlying panel
functions; \code{\link[lattice]{panel.points}},
\code{\link[lattice]{panel.lines}},
More information about the Analogue-commits
mailing list