[Distr-commits] r1206 - branches/distr-2.8/pkg/distr/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jul 20 16:26:22 CEST 2018
Author: ruckdeschel
Date: 2018-07-20 16:26:22 +0200 (Fri, 20 Jul 2018)
New Revision: 1206
Modified:
branches/distr-2.8/pkg/distr/R/plot-methods.R
branches/distr-2.8/pkg/distr/R/qqplot.R
Log:
[distr] branch 2.8 unified return value of plot and qqplot
Modified: branches/distr-2.8/pkg/distr/R/plot-methods.R
===================================================================
--- branches/distr-2.8/pkg/distr/R/plot-methods.R 2018-07-18 21:42:57 UTC (rev 1205)
+++ branches/distr-2.8/pkg/distr/R/plot-methods.R 2018-07-20 14:26:22 UTC (rev 1206)
@@ -40,6 +40,26 @@
}
pL <- .fillList(pL, l.draw)
+ plotInfo <- list(call = mc, dots=dots,
+ args = list(width = width, height = height,
+ withSweave = withSweave,
+ xlim = xlim, ylim = ylim, ngrid = ngrid,
+ verticals = verticals, do.points = do.points,
+ main = main, inner = inner, sub = sub,
+ bmar = bmar, tmar = tmar, cex.main = cex.main,
+ cex.inner = cex.inner, cex.sub = cex.sub,
+ col.points = col.points, col.vert = col.vert,
+ col.main = col.main, col.inner = col.inner,
+ col.sub = col.sub, cex.points = cex.points,
+ pch.u = pch.u, pch.a = pch.a, mfColRow = mfColRow,
+ to.draw.arg = to.draw.arg, withSubst = withSubst),
+ to.draw=to.draw, panelFirst = pF,
+ panelLast = pL)
+
+ plotInfo$to.draw <- to.draw
+ plotInfo$panelFirst <- pF
+ plotInfo$panelLast <- pL
+
dots$panel.first <- dots$panel.last <- NULL
dots$col.hor <- NULL
@@ -247,23 +267,6 @@
}
}
- plotInfo <- list(call = mc, dots=dots,
- args = list(width = width, height = height,
- withSweave = withSweave,
- xlim = xlim, ylim = ylim, ngrid = ngrid,
- verticals = verticals, do.points = do.points,
- main = main, inner = inner, sub = sub,
- bmar = bmar, tmar = tmar, cex.main = cex.main,
- cex.inner = cex.inner, cex.sub = cex.sub,
- col.points = col.points, col.vert = col.vert,
- col.main = col.main, col.inner = col.inner,
- col.sub = col.sub, cex.points = cex.points,
- pch.u = pch.u, pch.a = pch.a, mfColRow = mfColRow,
- to.draw.arg = to.draw.arg, withSubst = withSubst),
- to.draw=to.draw, panelFirst = pF,
- panelLast = pL)
-
-
plotCount <- 1
o.warn <- getOption("warn"); options(warn = -1)
if(1%in%to.draw){
@@ -705,12 +708,12 @@
plotInfo$dplot$title <- list(main = inner.d, line = lineT,
cex.main = cex.inner, col.main = col.inner)
- if(do.points)
+ if(do.points){
do.call(points, c(list(x = supp, y = dx, pch = pch.a,
cex = cex.points, col = col.points), dots.for.points))
plotInfo$dplot$points <- c(list(x = supp, y = dx, pch = pch.a,
cex = cex.points, col = col.points), dots.for.points)
-
+ }
options(warn = -1)
}
ngrid <- length(supp)
Modified: branches/distr-2.8/pkg/distr/R/qqplot.R
===================================================================
--- branches/distr-2.8/pkg/distr/R/qqplot.R 2018-07-18 21:42:57 UTC (rev 1205)
+++ branches/distr-2.8/pkg/distr/R/qqplot.R 2018-07-20 14:26:22 UTC (rev 1206)
@@ -20,7 +20,37 @@
legend.pos = "topleft", legend.cex = 0.8, legend.pref = "",
legend.postf = "", legend.alpha = alpha.CI, debug = FALSE, withSubst = TRUE){
+
+ args0 <- list(x = x, y = y, n = n, withIdLine = withIdLine,
+ withConf = withConf, withConf.pw = withConf.pw,
+ withConf.sim = if(missing(withConf.sim)) {
+ if(missing(withConf)) NULL else withConf} else withConf.sim,
+ plot.it = plot.it, xlab = xlab, ylab = ylab, width = width,
+ height = height, withSweave = withSweave, mfColRow=mfColRow,
+ n.CI = if(!missing(n.CI)) n.CI else if(!missing(n)) n else NULL,
+ col.IdL = col.IdL, lty.IdL = lty.IdL, lwd.IdL = lwd.IdL,
+ alpha.CI = alpha.CI,
+ exact.pCI = if(!missing(exact.pCI)) exact.pCI else if(!missing(n)) (n<100) else NULL,
+ exact.sCI = if(!missing(exact.pCI)) exact.sCI else if(!missing(n)) (n<100) else NULL,
+ nosym.pCI = nosym.pCI, col.pCI = col.pCI, lty.pCI = lty.pCI,
+ lwd.pCI = lwd.pCI, pch.pCI = pch.pCI, cex.pCI = cex.pCI, col.sCI = col.sCI,
+ lty.sCI = lty.sCI, lwd.sCI = lwd.sCI, pch.sCI = pch.sCI, cex.sCI = cex.sCI,
+ cex.pch = cex.pch, col.pch = col.pch, jit.fac = jit.fac,
+ check.NotInSupport = check.NotInSupport,
+ col.NotInSupport = col.NotInSupport, with.legend = with.legend,
+ legend.bg = legend.bg, legend.pos = legend.pos, legend.cex = legend.cex,
+ legend.pref = legend.pref, legend.postf = legend.postf,
+ legend.alpha = if(!missing(legend.alpha)) legend.alpha else if(!missing(alpha.CI)) alpha.CI else NULL,
+ debug = debug, withSubst = withSubst)
+
+
+
mc <- match.call(call = sys.call(sys.parent(1)))
+ dots <- match.call(call = sys.call(sys.parent(1)), expand.dots = FALSE)$"..."
+
+ plotInfo <- list(call = mc, dots=dots, args=args0)
+
+
xcc <- as.character(deparse(mc$x))
ycc <- as.character(deparse(mc$y))
if(missing(xlab)) mc$xlab <- xcc
@@ -153,7 +183,7 @@
}
}
}
- qqplotInfo <- c(ret, usr=qq.usr, qqplotInfo, qqb)
+ qqplotInfo <- c(plotInfo, ret=ret, usr=qq.usr, qqplotInfo=qqplotInfo, qqb=qqb)
class(qqplotInfo) <- c("qqplotInfo","DiagnInfo")
return(invisible(qqplotInfo))
})
More information about the Distr-commits
mailing list