[Robast-commits] r1075 - branches/robast-1.1/pkg/RobAStBase/R branches/robast-1.2/pkg/RobAStBase/R pkg/RobAStBase/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Jul 29 17:58:19 CEST 2018


Author: ruckdeschel
Date: 2018-07-29 17:58:19 +0200 (Sun, 29 Jul 2018)
New Revision: 1075

Modified:
   branches/robast-1.1/pkg/RobAStBase/R/AllPlot.R
   branches/robast-1.1/pkg/RobAStBase/R/comparePlot.R
   branches/robast-1.1/pkg/RobAStBase/R/infoPlot.R
   branches/robast-1.2/pkg/RobAStBase/R/AllPlot.R
   branches/robast-1.2/pkg/RobAStBase/R/comparePlot.R
   branches/robast-1.2/pkg/RobAStBase/R/infoPlot.R
   pkg/RobAStBase/R/AllPlot.R
   pkg/RobAStBase/R/comparePlot.R
   pkg/RobAStBase/R/infoPlot.R
Log:
[RobAStBase] trunk & branch 1.1 & branch 1.2:
bugfix as to legend: arguments lwd and lty were not correctly passed through to legend in plot-IC and compareIC

Modified: branches/robast-1.1/pkg/RobAStBase/R/AllPlot.R
===================================================================
--- branches/robast-1.1/pkg/RobAStBase/R/AllPlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ branches/robast-1.1/pkg/RobAStBase/R/AllPlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -39,6 +39,7 @@
         dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
         dotsLeg <- dotsT <- dotsL <- .makedotsLowLevel(dots)
+        dotsLeg$lty <- dotsLeg$lwd <- dotsLeg$col <- NULL
 
         dotsP <- dots
         dotsP$type <- dotsP$lty <- dotsP$col <- dotsP$lwd <- NULL
@@ -128,8 +129,9 @@
            xlim <- .xylim$xlim; ylim <- .xylim$ylim
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims0, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims0, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
+        lwd <- if(is.null(dots$lwd))  1 else eval(dots$lwd)
 
         .pFL <- .preparePanelFirstLast(with.automatic.grid , dims0, pF.0, pL.0,
                              logArg, scaleX, scaleY, x.ticks, y.ticks,
@@ -253,12 +255,14 @@
 
             if(wmar) do.call(par,args=parArgsL[[i]])
 
-            plotInfo$PlotArgs[[i]] <- c(list(x=x.vec1, y=y.vec1, type = plty, lty = lty,
+            plotInfo$PlotArgs[[i]] <- c(list(x=x.vec1, y=y.vec1, type = plty,
+                                      lty = lty, lwd = lwd,
                                       xlab = .mpresubs(xlab), ylab = .mpresubs(ylab),
                                       panel.first = pF[[i]],
                                       panel.last = pL), dotsP[[i]])
 
-            do.call(plot, args=c(list(x=x.vec1, y=y.vec1, type = plty, lty = lty,
+            do.call(plot, args=c(list(x=x.vec1, y=y.vec1, type = plty,
+                                      lty = lty, lwd = lwd,
                                       xlab = .mpresubs(xlab), ylab = .mpresubs(ylab),
                                       panel.first = pF[[i]],
                                       panel.last = pL), dotsP[[i]]))
@@ -294,9 +298,9 @@
                 y.vecD <- rescD$Y
 
                 dotsL$lty <- NULL
-                do.call(lines,args=c(list(x.vecD, y.vecD,
+                do.call(lines,args=c(list(x.vecD, y.vecD, lwd = lwd,
                                           lty = "dotted"), dotsL))
-                plotInfo$PlotLinesD[[i]] <- c(list(x.vecD, y.vecD,
+                plotInfo$PlotLinesD[[i]] <- c(list(x.vecD, y.vecD, lwd = lwd,
                                           lty = "dotted"), dotsL)
             }
             do.call(title,args=c(list(main = innerT[i]), dotsT, line = lineT,
@@ -307,10 +311,12 @@
             if(with.legend){
                legend(.legendCoord(legend.location[[i]], scaleX[i], scaleX.fct[[i]],
                         scaleY[i], scaleY.fct[[i]]), bg = legend.bg,
-                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg)
+                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg,
+                      lwd = lwd, lty = lty)
                plotInfo$Legend[[i]] <- list(.legendCoord(legend.location[[i]],
-                      scaleX[i], scaleX.fct[[i]], scaleY[i], scaleY.fct[[i]]), bg = legend.bg,
-                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg)
+                      scaleX[i], scaleX.fct[[i]], scaleY[i], scaleY.fct[[i]]),
+                      bg = legend.bg, legend = legend[[i]], dotsLeg,
+                      cex = legend.cex*fac.leg, lwd = lwd, lty = lty)
             }
 
         }

Modified: branches/robast-1.1/pkg/RobAStBase/R/comparePlot.R
===================================================================
--- branches/robast-1.1/pkg/RobAStBase/R/comparePlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ branches/robast-1.1/pkg/RobAStBase/R/comparePlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -78,6 +78,7 @@
         dotsP$panel.last <- NULL
 
         dotsLeg <- dotsT <- dotsL <- .makedotsLowLevel(dots)
+        dotsLeg$lty <- dotsLeg$lwd <- dotsLeg$col <- NULL
         dots.points <-   .makedotsPt(dots)
         
         ncomp <- 2+ (!missing(obj3)|!is.null(obj3)) +
@@ -170,7 +171,7 @@
           xlim <- .xylim$xlim; ylim <- .xylim$ylim;
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims0, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims0, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
 
         dims <- nrow(trafo(L2Fam at param)); ID <- diag(dims)
@@ -684,10 +685,10 @@
            if(is.null(legend)) legend <- xc
            legend(.legendCoord(legend.location, scaleX, scaleX.fct,
                         scaleY, scaleY.fct[[i]]), col = col, bg = legend.bg,
-                      legend = legend, dotsLeg, cex = legend.cex)
+                      legend = legend, dotsLeg, cex = legend.cex, lwd = lwd, lty = lty)
            plotInfo$Legend[[i]] <- list(.legendCoord(legend.location, scaleX, scaleX.fct,
                         scaleY, scaleY.fct[[i]]), col = col, bg = legend.bg,
-                      legend = legend, dotsLeg, cex = legend.cex)
+                      legend = legend, dotsLeg, cex = legend.cex, lwd = lwd, lty = lty)
         }
 
         cex.main <- if(!hasArg(cex.main)) par("cex.main") else dots$"cex.main"

Modified: branches/robast-1.1/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-1.1/pkg/RobAStBase/R/infoPlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ branches/robast-1.1/pkg/RobAStBase/R/infoPlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -167,7 +167,7 @@
            xlim <- .xylim$xlim; ylim <- .xylim$ylim
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims1, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims1, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
 
 

Modified: branches/robast-1.2/pkg/RobAStBase/R/AllPlot.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/AllPlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ branches/robast-1.2/pkg/RobAStBase/R/AllPlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -39,6 +39,7 @@
         dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
         dotsLeg <- dotsT <- dotsL <- .makedotsLowLevel(dots)
+        dotsLeg$lty <- dotsLeg$lwd <- dotsLeg$col <- NULL
 
         dotsP <- dots
         dotsP$type <- dotsP$lty <- dotsP$col <- dotsP$lwd <- NULL
@@ -128,8 +129,9 @@
            xlim <- .xylim$xlim; ylim <- .xylim$ylim
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims0, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims0, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
+        lwd <- if(is.null(dots$lwd))  1 else eval(dots$lwd)
 
         .pFL <- .preparePanelFirstLast(with.automatic.grid , dims0, pF.0, pL.0,
                              logArg, scaleX, scaleY, x.ticks, y.ticks,
@@ -253,12 +255,14 @@
 
             if(wmar) do.call(par,args=parArgsL[[i]])
 
-            plotInfo$PlotArgs[[i]] <- c(list(x=x.vec1, y=y.vec1, type = plty, lty = lty,
+            plotInfo$PlotArgs[[i]] <- c(list(x=x.vec1, y=y.vec1, type = plty,
+                                      lty = lty, lwd = lwd,
                                       xlab = .mpresubs(xlab), ylab = .mpresubs(ylab),
                                       panel.first = pF[[i]],
                                       panel.last = pL), dotsP[[i]])
 
-            do.call(plot, args=c(list(x=x.vec1, y=y.vec1, type = plty, lty = lty,
+            do.call(plot, args=c(list(x=x.vec1, y=y.vec1, type = plty,
+                                      lty = lty, lwd = lwd,
                                       xlab = .mpresubs(xlab), ylab = .mpresubs(ylab),
                                       panel.first = pF[[i]],
                                       panel.last = pL), dotsP[[i]]))
@@ -294,9 +298,9 @@
                 y.vecD <- rescD$Y
 
                 dotsL$lty <- NULL
-                do.call(lines,args=c(list(x.vecD, y.vecD,
+                do.call(lines,args=c(list(x.vecD, y.vecD, lwd = lwd,
                                           lty = "dotted"), dotsL))
-                plotInfo$PlotLinesD[[i]] <- c(list(x.vecD, y.vecD,
+                plotInfo$PlotLinesD[[i]] <- c(list(x.vecD, y.vecD, lwd = lwd,
                                           lty = "dotted"), dotsL)
             }
             do.call(title,args=c(list(main = innerT[i]), dotsT, line = lineT,
@@ -307,10 +311,12 @@
             if(with.legend){
                legend(.legendCoord(legend.location[[i]], scaleX[i], scaleX.fct[[i]],
                         scaleY[i], scaleY.fct[[i]]), bg = legend.bg,
-                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg)
+                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg,
+                      lwd = lwd, lty = lty)
                plotInfo$Legend[[i]] <- list(.legendCoord(legend.location[[i]],
-                      scaleX[i], scaleX.fct[[i]], scaleY[i], scaleY.fct[[i]]), bg = legend.bg,
-                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg)
+                      scaleX[i], scaleX.fct[[i]], scaleY[i], scaleY.fct[[i]]),
+                      bg = legend.bg, legend = legend[[i]], dotsLeg,
+                      cex = legend.cex*fac.leg, lwd = lwd, lty = lty)
             }
 
         }

Modified: branches/robast-1.2/pkg/RobAStBase/R/comparePlot.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/comparePlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ branches/robast-1.2/pkg/RobAStBase/R/comparePlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -78,6 +78,7 @@
         dotsP$panel.last <- NULL
 
         dotsLeg <- dotsT <- dotsL <- .makedotsLowLevel(dots)
+        dotsLeg$lty <- dotsLeg$lwd <- dotsLeg$col <- NULL
         dots.points <-   .makedotsPt(dots)
         
         ncomp <- 2+ (!missing(obj3)|!is.null(obj3)) +
@@ -170,7 +171,7 @@
           xlim <- .xylim$xlim; ylim <- .xylim$ylim;
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims0, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims0, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
 
         dims <- nrow(trafo(L2Fam at param)); ID <- diag(dims)
@@ -684,10 +685,10 @@
            if(is.null(legend)) legend <- xc
            legend(.legendCoord(legend.location, scaleX, scaleX.fct,
                         scaleY, scaleY.fct[[i]]), col = col, bg = legend.bg,
-                      legend = legend, dotsLeg, cex = legend.cex)
+                      legend = legend, dotsLeg, cex = legend.cex, lwd = lwd, lty = lty)
            plotInfo$Legend[[i]] <- list(.legendCoord(legend.location, scaleX, scaleX.fct,
                         scaleY, scaleY.fct[[i]]), col = col, bg = legend.bg,
-                      legend = legend, dotsLeg, cex = legend.cex)
+                      legend = legend, dotsLeg, cex = legend.cex, lwd = lwd, lty = lty)
         }
 
         cex.main <- if(!hasArg(cex.main)) par("cex.main") else dots$"cex.main"

Modified: branches/robast-1.2/pkg/RobAStBase/R/infoPlot.R
===================================================================
--- branches/robast-1.2/pkg/RobAStBase/R/infoPlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ branches/robast-1.2/pkg/RobAStBase/R/infoPlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -167,7 +167,7 @@
            xlim <- .xylim$xlim; ylim <- .xylim$ylim
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims1, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims1, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
 
 

Modified: pkg/RobAStBase/R/AllPlot.R
===================================================================
--- pkg/RobAStBase/R/AllPlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ pkg/RobAStBase/R/AllPlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -39,6 +39,7 @@
         dots <- match.call(call = sys.call(sys.parent(1)), 
                        expand.dots = FALSE)$"..."
         dotsLeg <- dotsT <- dotsL <- .makedotsLowLevel(dots)
+        dotsLeg$lty <- dotsLeg$lwd <- dotsLeg$col <- NULL
 
         dotsP <- dots
         dotsP$type <- dotsP$lty <- dotsP$col <- dotsP$lwd <- NULL
@@ -128,8 +129,9 @@
            xlim <- .xylim$xlim; ylim <- .xylim$ylim
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims0, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims0, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
+        lwd <- if(is.null(dots$lwd))  1 else eval(dots$lwd)
 
         .pFL <- .preparePanelFirstLast(with.automatic.grid , dims0, pF.0, pL.0,
                              logArg, scaleX, scaleY, x.ticks, y.ticks,
@@ -253,12 +255,14 @@
 
             if(wmar) do.call(par,args=parArgsL[[i]])
 
-            plotInfo$PlotArgs[[i]] <- c(list(x=x.vec1, y=y.vec1, type = plty, lty = lty,
+            plotInfo$PlotArgs[[i]] <- c(list(x=x.vec1, y=y.vec1, type = plty,
+                                      lty = lty, lwd = lwd,
                                       xlab = .mpresubs(xlab), ylab = .mpresubs(ylab),
                                       panel.first = pF[[i]],
                                       panel.last = pL), dotsP[[i]])
 
-            do.call(plot, args=c(list(x=x.vec1, y=y.vec1, type = plty, lty = lty,
+            do.call(plot, args=c(list(x=x.vec1, y=y.vec1, type = plty,
+                                      lty = lty, lwd = lwd,
                                       xlab = .mpresubs(xlab), ylab = .mpresubs(ylab),
                                       panel.first = pF[[i]],
                                       panel.last = pL), dotsP[[i]]))
@@ -294,9 +298,9 @@
                 y.vecD <- rescD$Y
 
                 dotsL$lty <- NULL
-                do.call(lines,args=c(list(x.vecD, y.vecD,
+                do.call(lines,args=c(list(x.vecD, y.vecD, lwd = lwd,
                                           lty = "dotted"), dotsL))
-                plotInfo$PlotLinesD[[i]] <- c(list(x.vecD, y.vecD,
+                plotInfo$PlotLinesD[[i]] <- c(list(x.vecD, y.vecD, lwd = lwd,
                                           lty = "dotted"), dotsL)
             }
             do.call(title,args=c(list(main = innerT[i]), dotsT, line = lineT,
@@ -307,10 +311,12 @@
             if(with.legend){
                legend(.legendCoord(legend.location[[i]], scaleX[i], scaleX.fct[[i]],
                         scaleY[i], scaleY.fct[[i]]), bg = legend.bg,
-                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg)
+                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg,
+                      lwd = lwd, lty = lty)
                plotInfo$Legend[[i]] <- list(.legendCoord(legend.location[[i]],
-                      scaleX[i], scaleX.fct[[i]], scaleY[i], scaleY.fct[[i]]), bg = legend.bg,
-                      legend = legend[[i]], dotsLeg, cex = legend.cex*fac.leg)
+                      scaleX[i], scaleX.fct[[i]], scaleY[i], scaleY.fct[[i]]),
+                      bg = legend.bg, legend = legend[[i]], dotsLeg,
+                      cex = legend.cex*fac.leg, lwd = lwd, lty = lty)
             }
 
         }

Modified: pkg/RobAStBase/R/comparePlot.R
===================================================================
--- pkg/RobAStBase/R/comparePlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ pkg/RobAStBase/R/comparePlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -78,6 +78,7 @@
         dotsP$panel.last <- NULL
 
         dotsLeg <- dotsT <- dotsL <- .makedotsLowLevel(dots)
+        dotsLeg$lty <- dotsLeg$lwd <- dotsLeg$col <- NULL
         dots.points <-   .makedotsPt(dots)
         
         ncomp <- 2+ (!missing(obj3)|!is.null(obj3)) +
@@ -170,7 +171,7 @@
           xlim <- .xylim$xlim; ylim <- .xylim$ylim;
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims0, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims0, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
 
         dims <- nrow(trafo(L2Fam at param)); ID <- diag(dims)
@@ -684,10 +685,10 @@
            if(is.null(legend)) legend <- xc
            legend(.legendCoord(legend.location, scaleX, scaleX.fct,
                         scaleY, scaleY.fct[[i]]), col = col, bg = legend.bg,
-                      legend = legend, dotsLeg, cex = legend.cex)
+                      legend = legend, dotsLeg, cex = legend.cex, lwd = lwd, lty = lty)
            plotInfo$Legend[[i]] <- list(.legendCoord(legend.location, scaleX, scaleX.fct,
                         scaleY, scaleY.fct[[i]]), col = col, bg = legend.bg,
-                      legend = legend, dotsLeg, cex = legend.cex)
+                      legend = legend, dotsLeg, cex = legend.cex, lwd = lwd, lty = lty)
         }
 
         cex.main <- if(!hasArg(cex.main)) par("cex.main") else dots$"cex.main"

Modified: pkg/RobAStBase/R/infoPlot.R
===================================================================
--- pkg/RobAStBase/R/infoPlot.R	2018-07-29 14:43:35 UTC (rev 1074)
+++ pkg/RobAStBase/R/infoPlot.R	2018-07-29 15:58:19 UTC (rev 1075)
@@ -167,7 +167,7 @@
            xlim <- .xylim$xlim; ylim <- .xylim$ylim
 
         if(missing(x.vec)) x.vec <- NULL
-        x.v.ret <- .getX.vec(distr, dims1, dots$lty, x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
+        x.v.ret <- .getX.vec(distr, dims1, eval(dots$lty), x.vec, scaleX, scaleX.fct, scaleX.inv, .xylim$xm, .xylim$xM)
               lty <- x.v.ret$lty; plty <- x.v.ret$plty; x.vec <- x.v.ret$x.vec
 
 



More information about the Robast-commits mailing list