[Distr-commits] r853 - branches/distr-2.5/pkg/distr/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Fri Jan 11 02:17:36 CET 2013
Author: ruckdeschel
Date: 2013-01-11 02:17:36 +0100 (Fri, 11 Jan 2013)
New Revision: 853
Added:
branches/distr-2.5/pkg/distr/R/makedots.R
Modified:
branches/distr-2.5/pkg/distr/R/plot-methods.R
branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R
Log:
unified dots-manipulations
Added: branches/distr-2.5/pkg/distr/R/makedots.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/makedots.R (rev 0)
+++ branches/distr-2.5/pkg/distr/R/makedots.R 2013-01-11 01:17:36 UTC (rev 853)
@@ -0,0 +1,17 @@
+.makedotsLowLevel <- function(dots){
+ dots$sub <- dots$xlab <- dots$ylab <- dots$main <- dots$type <- NULL
+ dots$xlim <- dots$ylim <- dots$yaxt <- dots$axes <- dots$xaxt <- NULL
+ dots$panel.last <- dots$panel.first <- dots$frame.plot <- dots$ann <-NULL
+ dots$log <- dots$bg <- dots$asp <- NULL
+ return(dots)
+}
+.makedotsL <- function(dots){
+ dots <- .makedotsLowLevel(dots)
+ dots$pch <- dots$cex <- NULL
+ dots
+}
+.makedotsP <- function(dots){
+ dots <- .makedotsLowLevel(dots)
+ dots$lwd <- dots$lty <- NULL
+ dots
+}
Modified: branches/distr-2.5/pkg/distr/R/plot-methods.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/plot-methods.R 2013-01-10 15:18:56 UTC (rev 852)
+++ branches/distr-2.5/pkg/distr/R/plot-methods.R 2013-01-11 01:17:36 UTC (rev 853)
@@ -30,10 +30,10 @@
dots$col.hor <- NULL
- dots.for.points <- dots[names(dots) %in% c("bg", "lwd", "lty")]
- if (length(dots.for.points) == 0 ) dots.for.points <- NULL
+ dots.for.points <- .makedotsPt(dots)
- dots.without.pch <- dots[! (names(dots) %in% c("pch", "log", "xlab", "ylab"))]
+ dots.lowlevel <- .makedotsLowLevel(dots)
+ dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch"))]
if(!is(x,"AbscontDistribution"))
x <- .ULC.cast(x)
###
@@ -360,11 +360,9 @@
dots$ngrid <- NULL
- dots.for.points <- dots[names(dots) %in% c("bg", "lwd", "lty")]
- if (length(dots.for.points) == 0 ) dots.for.points <- NULL
-
- dots.without.pch <- dots[! (names(dots) %in% c("pch",
- "main", "sub", "log", "xlab", "ylab"))]
+ dots.for.points <- .makedotsPt(dots)
+ dots.lowlevel <- .makedotsLowLevel(dots)
+ dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch"))]
###
if(!is(x,"DiscreteDistribution"))
x <- .ULC.cast(x)
Modified: branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R
===================================================================
--- branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R 2013-01-10 15:18:56 UTC (rev 852)
+++ branches/distr-2.5/pkg/distr/R/plot-methods_LebDec.R 2013-01-11 01:17:36 UTC (rev 853)
@@ -125,14 +125,11 @@
return(invisible())
}
+ dots.for.points <- .makedotsPt(dots)
- dots.for.points <- dots[names(dots) %in% c("bg", "lwd", "lty","ngrid")]
- if (length(dots.for.points) == 0 ) dots.for.points <- NULL
-
- dots.without.pch <- dots[! (names(dots) %in% c("pch",
- "main", "sub", "log", "ylab", "xlab"))]
- dots.for.lines <- dots.without.pch[! (names(dots.without.pch) %in% c("panel.first",
- "panel.last", "ngrid", "frame.plot"))]
+ dots.lowlevel <- .makedotsLowLevel(dots)
+ dots.without.pch <- dots.lowlevel[! (names(dots.lowlevel) %in% c("pch"))]
+ dots.for.lines <- .makedotsL(dots)
dots.v <- dots.for.lines
dots.v$col <- NULL
###
More information about the Distr-commits
mailing list