[R] Adding image to plotting area
Dario Strbenac
D.Strbenac at garvan.org.au
Fri Jan 28 01:00:12 CET 2011
Hello,
I've drawn a black rectangle over the plotting area, and when I add an image() heatmap, it doesn't take up all the area, but is set inward from the black rectangle. Can anyone suggest how to make it stretch out to the entire area ?
Minimal example :
y <- matrix(runif(2000*20), nrow = 2000)
y[100:200, 10] = NA
plot.new()
usr <- par('usr')
rect(usr[1], usr[3], usr[2], usr[4], col="black")
image(t(y), add = TRUE)
Thanks,
Dario.
More information about the R-help
mailing list