# NOT RUN {
plot(-1:1, -1:1, type = "n", xlab = "Re", ylab = "Im")
K <- 16; text(exp(1i * 2 * pi * (1:K) / K), col = 2)
## The following two examples use latin1 characters: these may not
## appear correctly (or be omitted entirely).
plot(1:10, 1:10, main = "text(...) examples\n~~~~~~~~~~~~~~",
sub = "R is GNU <U+00A9>, but not <U+00AE> ...")
mtext("<U+00AB>Latin-1 accented chars<U+00BB>: <U+00E9><U+00E8> <U+00F8><U+00D8> <U+00E5><<U+00C5> <U+00E6><<U+00C6>", side = 3)
points(c(6,2), c(2,1), pch = 3, cex = 4, col = "red")
text(6, 2, "the text is CENTERED around (x,y) = (6,2) by default",
cex = .8)
text(2, 1, "or Left/Bottom - JUSTIFIED at (2,1) by 'adj = c(0,0)'",
adj = c(0,0))
text(4, 9, expression(hat(beta) == (X^t * X)^{-1} * X^t * y))
text(4, 8.4, "expression(hat(beta) == (X^t * X)^{-1} * X^t * y)",
cex = .75)
text(4, 7, expression(bar(x) == sum(frac(x[i], n), i==1, n)))
## Two more latin1 examples
text(5, 10.2,
"Le fran<U+00E7>ais, c'est fa<U+00E7>ile: R<U+00E8>gles, Libert<U+00E9>, Egalit<U+00E9>, Fraternit<U+00E9>...")
text(5, 9.8,
"Jetz no chli z<U+00FC>rit<U+00FC><U+00FC>tsch: (noch ein bi<U+00DF>chen Z<U+00FC>rcher deutsch)")
# }
Run the code above in your browser using DataLab