Displaying 1 result from an estimated 1 matches for "preccesion".
Did you mean:
precesion
2008 Jan 31
1
png() and pdf() alignment problems
...00000 squares,
each representing a raster cell.
So my a attempt was to separate vector and image output,
and overlay it afterwards.
Doing so I found that png() and pdf() do not register corectly.
The following script shows that a custom device size (not square)
can be responsible for the missing preccesion.
require(grDevices)
x <- y <- seq(-4*pi, 4*pi, len=27)
r <- sqrt(outer(x^2, y^2, "+"))
z <- cos(r^2)*exp(-r/6), col=gray((0:32)/32)
# example1
# standard device size
pdf("pdf_fit.pdf")
image(z)
dev.off()
png("png_fit.png", res = 96)
image(z)
dev.off()
#...