The R Project SVN R

Rev

Rev 23008 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 23008 Rev 25936
Line 123... Line 123...
123
\seealso{
123
\seealso{
124
  \code{demo(plotmath)},
124
  \code{demo(plotmath)},
125
  \code{\link{axis}},
125
  \code{\link{axis}},
126
  \code{\link{mtext}},
126
  \code{\link{mtext}},
127
  \code{\link{text}},
127
  \code{\link{text}},
128
  \code{\link{title}}
128
  \code{\link{title}},
-
 
129
  \code{\link{substitute}}
-
 
130
  \code{\link{quote}}, \code{\link{bquote}}
129
}
131
}
130
\examples{
132
\examples{
131
x <- seq(-4, 4, len = 101)
133
x <- seq(-4, 4, len = 101)
132
y <- cbind(sin(x), cos(x))
134
y <- cbind(sin(x), cos(x))
133
matplot(x, y, type = "l", xaxt = "n",
135
matplot(x, y, type = "l", xaxt = "n",
Line 140... Line 142...
140
     lab = expression(-pi, -pi/2, 0, pi/2, pi))
142
     lab = expression(-pi, -pi/2, 0, pi/2, pi))
141
 
143
 
142
 
144
 
143
## How to combine "math" and numeric variables :
145
## How to combine "math" and numeric variables :
144
plot(1:10, type="n", xlab="", ylab="", main = "plot math & numbers")
146
plot(1:10, type="n", xlab="", ylab="", main = "plot math & numbers")
145
tt <- 1.23 ; mtext(substitute(hat(theta) == that, list(that= tt)))
147
theta <- 1.23 ; mtext(bquote(hat(theta) == .(theta)))
146
for(i in 2:9)
148
for(i in 2:9)
147
    text(i,i+1, substitute(list(xi,eta) == group("(",list(x,y),")"),
149
    text(i,i+1, substitute(list(xi,eta) == group("(",list(x,y),")"),
148
                           list(x=i, y=i+1)))
150
                           list(x=i, y=i+1)))
149
 
151
 
150
plot(1:10, 1:10)
152
plot(1:10, 1:10)