search for: imsize

Displaying 2 results from an estimated 2 matches for "imsize".

Did you mean: i_size
2007 Aug 11
1
Artifacts in pdf() of image() (w/o comments)
Dear r-helpers, In my previous message there were comments in the code that may have made cutting and pasting awkward. Here it is w/o them. I have two questions: (1) The following produces a pdf with artifacts. How do I prevent them? require(grDevices) imSize <- 200 lambda <- 10 theta <- 15 sigma <- 40 x <- 1:imSize x0 <- x / imSize -.5 freq = imSize/lambda xf = x0 * freq * 2 * pi f <- function(x, y){r <- -((x^2 + y^2)/(sigma ^2)); exp(r)} z <- outer(xf, xf, f) f1 <- function(x, y){cos(.1 * x)} z1 <- outer(xf, xf, f1) pd...
2007 Aug 11
1
Artifacts in pdf() of image()
Dear r-helpers, I have two questions: (1) The following produces a pdf with artifacts. How do I prevent them? require(grDevices) imSize <- 200 lambda <- 10 theta <- 15 sigma <- 40 x <- 1:imSize x0 <- x / imSize -.5 freq = imSize/lambda # compute frequency from wavelength xf = x0 * freq * 2 * pi # convert X to radians: 0 -> ( 2*pi * frequency) f <- function(x, y){r <...