Skip to content
Prev 75340 / 398502 Next

background colors in image()

Le 11.08.2005 00:59, array chip a ??crit :
You need to learn how to use par('usr') and argument add in image.
demo('graphics') is one way to learn or look at graph 8 on r graph gallery

R> image(matrix(c(1,2,NA, 1),2, 2))
R> usr <- par('usr')
R> rect(usr[1], usr[3], usr[2], usr[4], col="cornsilk")
R> image(matrix(c(1,2,NA, 1),2, 2),add=TRUE)

Romain