[R] How many pixels or steps in rasterImage interpolation?

Carl Witthoft carl at witthoft.com
Wed Oct 5 00:09:55 CEST 2011


Hi,
I'm looking at a very simple picture created with rasterImage.

foo <- matrix(1:9,3,3)
foo[,] <- rainbow(9)
plot(0:1,0:1,t='n')
rasterImage(foo,0,0,1,1)

If I choose to specify interpolate=F, I get the expected 9 blocks of 
color.  My question is:  how many values (aka pixels) does rasterImage 
use as it interpolates from one input cell to the next?  And I suppose I 
should ask if there's a way to control the size of the interpolation 
region as well.

I do recognize that rasterImage doesn't return anything, so it's not as 
though I'm trying to save a matrix of the interpolated pixel values. I 
just would like to get a feel for what's being done to my source data.

thanks
Carl

-- 
-----
Sent from my Cray XK6



More information about the R-help mailing list