[Distr-commits] r973 - in branches/distr-2.6/pkg: distr/R distrMod/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Oct 21 18:42:04 CEST 2014
Author: ruckdeschel
Date: 2014-10-21 18:42:04 +0200 (Tue, 21 Oct 2014)
New Revision: 973
Modified:
branches/distr-2.6/pkg/distr/R/plot-methods.R
branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R
branches/distr-2.6/pkg/distrMod/R/qqplot.R
branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R
Log:
[distr] fixed some issues with plotting of distributions xlim, ylim were not correctly passed on, same for col => now use dots.lowlevel ...
[distrMod] fixed issue with labeling in qqplot, set datax argument in case it is missing in returnlevelplot ...
Modified: branches/distr-2.6/pkg/distr/R/plot-methods.R
===================================================================
--- branches/distr-2.6/pkg/distr/R/plot-methods.R 2014-10-08 10:30:09 UTC (rev 972)
+++ branches/distr-2.6/pkg/distr/R/plot-methods.R 2014-10-21 16:42:04 UTC (rev 973)
@@ -247,12 +247,14 @@
o.warn <- getOption("warn"); options(warn = -1)
if(1%in%to.draw){
on.exit(options(warn=o.warn))
- dots.without.pch$panel.first <- pF[[plotCount]]
- dots.without.pch$panel.last <- pL[[plotCount]]
+ dots.lowlevel$panel.first <- pF[[plotCount]]
+ dots.lowlevel$panel.last <- pL[[plotCount]]
+ dots.lowlevel$xlim <- xlim
do.call(plot, c(list(x = grid, dxg, type = "l",
ylim = ylim1, ylab = ylab0[["d"]], xlab = xlab0[["d"]], log = logpd),
- dots.without.pch))
- dots.without.pch$panel.first <- dots.without.pch$panel.last <- NULL
+ dots.lowlevel))
+ dots.lowlevel$panel.first <- dots.lowlevel$panel.last <- NULL
+ dots.lowlevel$xlim <- NULL
plotCount <- plotCount + 1
options(warn = o.warn)
@@ -266,12 +268,14 @@
if(is.finite(q(x)(1))) {grid <- c(grid,q(x)(1)); pxg <- c(pxg,1)}
if(2%in%to.draw){
- dots.without.pch$panel.first <- pF[[plotCount]]
- dots.without.pch$panel.last <- pL[[plotCount]]
+ dots.lowlevel$panel.first <- pF[[plotCount]]
+ dots.lowlevel$panel.last <- pL[[plotCount]]
+ dots.lowlevel$xlim <- xlim
do.call(plot, c(list(x = grid, pxg, type = "l",
ylim = ylim2, ylab = ylab0[["p"]], xlab = xlab0[["p"]], log = logpd),
- dots.without.pch))
- dots.without.pch$panel.first <- dots.without.pch$panel.last <- NULL
+ dots.lowlevel))
+ dots.lowlevel$panel.first <- dots.lowlevel$panel.last <- NULL
+ dots.lowlevel$xlim <- NULL
plotCount <- plotCount + 1
options(warn = o.warn)
@@ -310,12 +314,12 @@
if(3%in%to.draw){
options(warn = -1)
- dots.without.pch$panel.first <- pF[[plotCount]]
- dots.without.pch$panel.last <- pL[[plotCount]]
+ dots.lowlevel$panel.first <- pF[[plotCount]]
+ dots.lowlevel$panel.last <- pL[[plotCount]]
do.call(plot, c(list(x = po, xo, type = "n",
xlim = ylim2, ylim = xlim, ylab = ylab0[["q"]], xlab = xlab0[["q"]],
- log = logq), dots.without.pch))
- dots.without.pch$panel.first <- dots.without.pch$panel.last <- NULL
+ log = logq), dots.lowlevel))
+ dots.lowlevel$panel.first <- dots.lowlevel$panel.last <- NULL
plotCount <- plotCount + 1
options(warn = o.warn)
Modified: branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R
===================================================================
--- branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R 2014-10-08 10:30:09 UTC (rev 972)
+++ branches/distr-2.6/pkg/distr/R/plot-methods_LebDec.R 2014-10-21 16:42:04 UTC (rev 973)
@@ -414,12 +414,14 @@
o.warn <- getOption("warn"); options(warn = -1)
if(1 %in% to.draw){
on.exit(options(warn=o.warn))
- dots.without.pch$panel.first <- pF[[plotCount]]
- dots.without.pch$panel.last <- pL[[plotCount]]
+ dots.lowlevel$panel.first <- pF[[plotCount]]
+ dots.lowlevel$panel.last <- pL[[plotCount]]
+ dots.lowlevel$xlim <- xlim
do.call(plot, c(list(x = grid, pxg, type = "l",
ylim = ylim2, ylab = ylab0[[1]][["p"]], xlab = xlab0[[1]][["p"]], log = logpd),
- dots.without.pch))
- dots.without.pch$panel.first <- dots.without.pch$panel.last <- NULL
+ dots.lowlevel))
+ dots.lowlevel$panel.first <- dots.lowlevel$panel.last <- NULL
+ dots.lowlevel$xlim <- NULL
plotCount <- plotCount + 1
options(warn = o.warn)
Modified: branches/distr-2.6/pkg/distrMod/R/qqplot.R
===================================================================
--- branches/distr-2.6/pkg/distrMod/R/qqplot.R 2014-10-08 10:30:09 UTC (rev 972)
+++ branches/distr-2.6/pkg/distrMod/R/qqplot.R 2014-10-21 16:42:04 UTC (rev 973)
@@ -95,16 +95,17 @@
){ ## return value as in stats::qqplot
mc <- match.call(call = sys.call(sys.parent(1)))
- if(missing(xlab)) mc$xlab <- as.character(deparse(mc$x))
- if(missing(ylab)) mc$ylab <- as.character(deparse(mc$y))
+ if(missing(xlab)){ xlab <- mc$xlab <- as.character(deparse(mc$x))}
+ if(missing(ylab)){ ylab <- mc$ylab <- as.character(deparse(mc$y))}
mcl <- as.list(mc)[-1]
mcl$withSweave <- NULL
mcl$mfColRow <- NULL
mcl$debug <- NULL
mcl$added.points.CI <- NULL
force(x)
+ if(is.null(mcl$datax)) datax <- FALSE
+ if(!datax){ mc$ylab <- xlab; mc$xlab <- ylab}
-
xj <- x
if(any(.isReplicated(x)))
xj[.isReplicated(x)] <- jitter(x[.isReplicated(x)], factor=jit.fac)
Modified: branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R
===================================================================
--- branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R 2014-10-08 10:30:09 UTC (rev 972)
+++ branches/distr-2.6/pkg/distrMod/R/returnlevelplot.R 2014-10-21 16:42:04 UTC (rev 973)
@@ -84,6 +84,7 @@
mcl$type <-NULL
mcl$debug <- NULL
mcl$added.points.CI <- NULL
+ if(is.null(mcl$datax)) datax <- FALSE
force(x)
thresh0 <- threshold
More information about the Distr-commits
mailing list