[Analogue-commits] r244 - in pkg: R inst man tests/Examples
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Mon Oct 24 15:59:15 CEST 2011
Author: gsimpson
Date: 2011-10-24 15:59:14 +0200 (Mon, 24 Oct 2011)
New Revision: 244
Modified:
pkg/R/panel.Stratiplot.R
pkg/inst/ChangeLog
pkg/man/panel.Stratiplot.Rd
pkg/tests/Examples/analogue-Ex.Rout.save
Log:
add ability to control number of grid lines drawn in panel.Stratiplot
Modified: pkg/R/panel.Stratiplot.R
===================================================================
--- pkg/R/panel.Stratiplot.R 2011-10-08 09:28:41 UTC (rev 243)
+++ pkg/R/panel.Stratiplot.R 2011-10-24 13:59:14 UTC (rev 244)
@@ -16,6 +16,7 @@
col.zones = plot.line$col,
lty.zones = plot.line$lty,
lwd.zones = plot.line$lwd,
+ gridh = -1, gridv = -1,
...) {
if (all(is.na(x) | is.na(y)))
return()
@@ -34,7 +35,7 @@
if ("o" %in% type || "b" %in% type)
type <- c(type, "p", "l")
if ("g" %in% type)
- panel.grid(h = -1, v = -1)
+ panel.grid(h = gridh, v = gridv, col.line = col.refline, ...)
if("l" %in% type)
panel.lines(x = x, y = y, col = col.line,
lty = lty, lwd = lwd, ...)
Modified: pkg/inst/ChangeLog
===================================================================
--- pkg/inst/ChangeLog 2011-10-08 09:28:41 UTC (rev 243)
+++ pkg/inst/ChangeLog 2011-10-24 13:59:14 UTC (rev 244)
@@ -7,6 +7,12 @@
absolute scale variables or a mix or relative and absolute
data. All reletaive data should be unaffected.
+ * panel.Stratiplot: gains arguments `gridh` and gridv` which
+ control the number of horizontal and vertical grid lines used
+ on each panel. These correspond to the `h` and `v` arguments of
+ `panel.grid` in the Lattice package. The default is `-1` for
+ both, which attempts to align the grid lines with the tick marks.
+
Version 0.7-5
* weightedCor: implements one of the tests from Telford & Birks
Modified: pkg/man/panel.Stratiplot.Rd
===================================================================
--- pkg/man/panel.Stratiplot.Rd 2011-10-08 09:28:41 UTC (rev 243)
+++ pkg/man/panel.Stratiplot.Rd 2011-10-24 13:59:14 UTC (rev 244)
@@ -27,6 +27,7 @@
col.zones = plot.line$col,
lty.zones = plot.line$lty,
lwd.zones = plot.line$lwd,
+ gridh = -1, gridv = -1,
\dots)
}
@@ -61,7 +62,8 @@
default colours are obtained from \code{plot.symbol} and
\code{plot.line} using
\code{\link[lattice]{trellis.par.get}}. \code{col.refline} controls the
- colour of the reference line drawn at value 0 on the x-axis.}
+ colour of the reference line drawn at value 0 on the x-axis, as well
+ as the colour of the grid lines if drawn.}
\item{pch, cex, lty, lwd, fill}{other graphical parameters, defaults
for which are obtained from \code{plot.symbol} and \code{plot.line}
using \code{\link[lattice]{trellis.par.get}}.}
@@ -73,6 +75,9 @@
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{gridh, gridv}{numeric arguments corresponding to \code{h} and
+ \code{v} of \code{\link{panel.grid}}, which control the number of
+ grid lines drawn.}
\item{\dots}{extra arguments passed on to the underlying panel
functions; \code{\link[lattice]{panel.points}},
\code{\link[lattice]{panel.lines}},
Modified: pkg/tests/Examples/analogue-Ex.Rout.save
===================================================================
--- pkg/tests/Examples/analogue-Ex.Rout.save 2011-10-08 09:28:41 UTC (rev 243)
+++ pkg/tests/Examples/analogue-Ex.Rout.save 2011-10-24 13:59:14 UTC (rev 244)
@@ -1,5 +1,5 @@
-R version 2.13.1 Patched (2011-09-13 r57007)
+R version 2.13.1 Patched (2011-07-08 r56332)
Copyright (C) 2011 The R Foundation for Statistical Computing
ISBN 3-900051-07-0
Platform: x86_64-unknown-linux-gnu (64-bit)
@@ -29,7 +29,7 @@
Loading required package: grid
Loading required package: MASS
Loading required package: princurve
-This is analogue 0.7-5
+This is analogue 0.7-6
>
> assign(".oldSearch", search(), pos = 'CheckExEnv')
> cleanEx()
@@ -6606,7 +6606,7 @@
> ### * <FOOTER>
> ###
> cat("Time elapsed: ", proc.time() - get("ptime", pos = 'CheckExEnv'),"\n")
-Time elapsed: 20.463 0.592 21.27 0 0
+Time elapsed: 33.471 1.19 34.679 0 0
> grDevices::dev.off()
null device
1
More information about the Analogue-commits
mailing list