bintext <- function(a = NULL, b = NULL, c = NULL, d = NULL, e = NULL, f = NULL, g = NULL, h = NULL, i = NULL,
a1 = 1, b1 = 1, c1 = 1, d1 = 1, e1 = 1, f1 = 1, g1 = 1, h1 = 1, i1 = 1,
cex = 1.1, col = "steelblue3") {
if (!is.null(a)) {
if (a1 == 1) {
text(0.7, -0.03, sprintf("POP = %s", as.character(a)), col = col, pos = 1, cex = cex)
} else {
text(0.7, 0.03, sprintf("POP = %s", as.character(a)), col = col, pos = a1, cex = cex)
}
}
if (!is.null(b)) {
if (b1 == 1) {
text(1.9, -0.03, sprintf("POP = %s", as.character(b)), col = col, pos = 1, cex = cex)
} else {
text(1.9, 0.03, sprintf("POP = %s", as.character(b)), col = col, pos = b1, cex = cex)
}
}
if (!is.null(c)) {
if (c1 == 1) {
text(3.1, -0.03, sprintf("POP = %s", as.character(c)), col = col, pos = 1, cex = cex)
} else {
text(3.1, 0.03, sprintf("POP = %s", as.character(c)), col = col, pos = c1, cex = cex)
}
}
if(!is.null(d)) {
if (d1 == 1) {
text(4.3, -0.03, sprintf("POP = %s", as.character(d)), col = col, pos = 1, cex = cex)
} else {
text(4.3, 0.03, sprintf("POP = %s", as.character(d)), col = col, pos = d1, cex = cex)
}
}
if(!is.null(e)) {
if (e1 == 1) {
text(5.5, -0.03, sprintf("POP = %s", as.character(e)), col = col, pos = 1, cex = cex)
} else {
text(5.5, 0.03, sprintf("POP = %s", as.character(e)), col = col, pos = e1, cex = cex)
}
}
if(!is.null(f)) {
if (f1 == 1) {
text(6.7, -0.03, sprintf("POP = %s", as.character(f)), col = col, pos = 1, cex = cex)
} else {
text(6.7, 0.03, sprintf("POP = %s", as.character(f)), col = col, pos = f1, cex = cex)
}
}
if(!is.null(g)) {
if (g1 == 1) {
text(7.9, -0.03, sprintf("POP = %s", as.character(g)), col = col, pos = 1, cex = cex)
} else {
text(7.9, 0.03, sprintf("POP = %s", as.character(g)), col = col, pos = g1, cex = cex)
}
}
if(!is.null(h)) {
if (h1 == 1) {
text(9.1, -0.03, sprintf("POP = %s", as.character(h)), col = col, pos = 1, cex = cex)
} else {
text(9.1, 0.03, sprintf("POP = %s", as.character(h)), col = col, pos = h1, cex = cex)
}
}
if(!is.null(i)) {
if (i1 == 1) {
text(10.3, -0.03, sprintf("POP = %s", as.character(i)), col = col, pos = 1, cex = cex)
} else {
text(10.3, 0.03, sprintf("POP = %s", as.character(i)), col = col, pos = i1, cex = cex)
}
}
}
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.