data(lennon)
str(lennon)
tlennon <- table(lennon)
plot(names(tlennon), sqrt(tlennon), type = "h",
ylab = "tlennon __ sqrt scaled", yaxt = "n",
main = "Gray value distribution of `Lennon'")
atl <- pretty(tlennon, 8)
axis(2, at=sqrt(atl), labels = formatC(atl,wid=1), las=2)
image(lennon, zlim = c(0, 192), col = gray(127:0/128))# white to dark
image(lennon, zlim = c(-10, 240), col = gray(127:0/128))
Run the code above in your browser using DataLab