Subversion Repositories bdplot

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1 pdel 1
\name{bdplot}
2
\alias{bdplot}
3
%- Also NEED an '\alias' for EACH other topic documented here.
4
\title{ ~~function to do ... ~~ }
5
\description{
6
  ~~ A concise (1-5 lines) description of what the function does. ~~
7
}
8
\usage{
9
bdplot(x, y = NULL, z = NULL, cex.plot = prm$cex.plot, xlab = prm$xlab, ylab = prm$ylab, xlim = range(x, prm$xlim, na.rm = TRUE), ylim = range(prm$ylim, y, na.rm = TRUE), col = prm$col, type = prm$xytype, ...)
10
}
11
%- maybe also 'usage' for other objects documented here.
12
\arguments{
13
  \item{x}{ ~~Describe \code{x} here~~ }
14
  \item{y}{ ~~Describe \code{y} here~~ }
15
  \item{z}{ ~~Describe \code{z} here~~ }
16
  \item{cex.plot}{ ~~Describe \code{cex.plot} here~~ }
17
  \item{xlab}{ ~~Describe \code{xlab} here~~ }
18
  \item{ylab}{ ~~Describe \code{ylab} here~~ }
19
  \item{xlim}{ ~~Describe \code{xlim} here~~ }
20
  \item{ylim}{ ~~Describe \code{ylim} here~~ }
21
  \item{col}{ ~~Describe \code{col} here~~ }
22
  \item{type}{ ~~Describe \code{type} here~~ }
23
  \item{\dots}{ ~~Describe \code{\dots} here~~ }
24
}
25
\details{
26
  ~~ If necessary, more details than the description above ~~
27
}
28
\value{
29
  ~Describe the value returned
30
  If it is a LIST, use
31
  \item{comp1 }{Description of 'comp1'}
32
  \item{comp2 }{Description of 'comp2'}
33
  ...
34
}
35
\references{ ~put references to the literature/web site here ~ }
36
\author{ ~~who you are~~ }
37
\note{ ~~further notes~~ 
38
 
39
 ~Make other sections like Warning with \section{Warning }{....} ~
40
}
41
\seealso{ ~~objects to See Also as \code{\link{help}}, ~~~ }
42
\examples{
43
##---- Should be DIRECTLY executable !! ----
44
##-- ==>  Define data, use random,
45
##--	or do  help(data=index)  for the standard data sets.
46
 
47
## The function is currently defined as
48
function (x, y = NULL, z = NULL, cex.plot = prm$cex.plot, xlab = prm$xlab, 
49
    ylab = prm$ylab, xlim = range(x, prm$xlim, na.rm = TRUE), 
50
    ylim = range(prm$ylim, y, na.rm = TRUE), col = prm$col, type = prm$xytype, 
51
    ...) 
52
{
53
    prm <- .BDPars
54
    par(cex.main = prm$cex.main, cex.lab = prm$cex.lab, cex.axis = prm$cex.axis)
55
    par(tcl = prm$tcl)
56
    par(lwd = prm$lwd)
57
    par(bty = prm$bty)
58
    mar <- prm$mar.nolab
59
    if (!is.na(prm$xlab)) {
60
        mar[1] <- prm$mar.lab[1]
61
    }
62
    if (!is.na(prm$ylab)) {
63
        mar[2] <- prm$mar.lab[2]
64
    }
65
    if (!is.na(prm$toplab)) {
66
        mar[3] <- prm$mar.lab[3]
67
    }
68
    if (!is.na(prm$rightlab)) {
69
        mar[4] <- prm$mar.lab[4]
70
    }
71
    par(mar = mar)
72
    par(mgp = prm$mgp.global)
73
    if (prm$method == "xy") {
74
        if (!is.null(y)) {
75
            cat("The Bacher/Delff Plotting System (R), (C), TM operating in xy-plotting mode.\n")
76
            plot(x, y, type = type, xaxt = "n", yaxt = "n", cex = cex.plot, 
77
                xlab = xlab, ylab = ylab, xlim = xlim, ylim = ylim, 
78
                ...)
79
        }
80
        else if (is.numeric(x)) {
81
            plot(x, type = type, xaxt = "n", yaxt = "n", cex = cex.plot, 
82
                xlab = xlab, ylab = ylab, ylim = xlim, ...)
83
        }
84
    }
85
    else if (prm$method == "barplot") {
86
        barplot(height = x, cex.axis = prm$cex.lab, cex.names = prm$cex.lab, 
87
            xlab = xlab, ylab = ylab, ...)
88
        prm$draw.xaxis <- FALSE
89
        prm$draw.yaxis <- FALSE
90
    }
91
    else if (class(x) == "acf") {
92
        plot(x, xlab = "", ylab = "", xaxt = "n", yaxt = "n", 
93
            cex = prm$cex.plot, xlim = prm$xlim, ylim = prm$ylim)
94
    }
95
    else if (class(x) == "histogram") {
96
        plot(x, xlab = xlab, ylab = ylab, main = prm$main, xaxt = "n", 
97
            yaxt = "n")
98
    }
99
    else if (class(x) == "trellis") {
100
        cat("The Bacher/Delff Plotting System (R), (C), TM operating in lattice mode.\n Remeber that labels must written in the lattice object.\n")
101
        trellis.par.set(prm$myLatticeSettings())
102
        plot(x)
103
        prm$draw.xaxis <- FALSE
104
        prm$draw.yaxis <- FALSE
105
    }
106
    else if (prm$method == "image.plot") {
107
        cat("The Bacher/Delff Plotting System (R), (C), TM operating in image plotting mode.\nx and y axis can not be configured.\n")
108
        image.plot(x = x, y = y, z = z, xlab = xlab, ylab = ylab, 
109
            ...)
110
    }
111
    if (prm$grid) {
112
        grid(col = prm$grid.col)
113
    }
114
    if (!is.na(prm$grid.v)) {
115
        if (prm$grid.v == "Def") {
116
            grid(nx = NULL, ny = NA, col = prm$grid.col)
117
        }
118
        else {
119
            abline(v = prm$grid.v, lty = "dotted", col = grid.col)
120
        }
121
    }
122
    if (!is.na(prm$grid.h)) {
123
        if (prm$grid.h == "Def") {
124
            grid(nx = NA, ny = NULL, col = prm$grid.col)
125
        }
126
        else {
127
            abline(h = prm$grid.h, lty = "dotted", col = grid.col)
128
        }
129
    }
130
    if (prm$draw.xaxis) {
131
        axis(1, mgp = prm$mgp.xaxis, lwd = prm$lwd)
132
    }
133
    if (prm$draw.yaxis) {
134
        axis(2, mgp = prm$mgp.yaxis, lwd = prm$lwd)
135
    }
136
    scale <- 1
137
    if (!is.na(prm$toplab)) {
138
        mtext(prm$xxlab, side = 3, line = 0.25, cex = prm$cex.lab/scale)
139
    }
140
    if (!is.na(prm$rightlab)) {
141
        mtext(prm$yylab, side = 4, line = 0.25, cex = prm$cex.lab/scale)
142
    }
143
  }
144
}
145
% Add one or more standard keywords, see file 'KEYWORDS' in the
146
% R documentation directory.
147
\keyword{ ~kwd1 }
148
\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line