I have a filled.contour plot that I would like to save as SVG (or EPS) for publication. However I see that the quality of the SVG is significantly worse than that of the TIFF. The plot in the SVG file appears to have some kinds of white boxes/lines/rectangles which do not appear when I save the file in TIFF format. In the TIFF format the color transitions are much smoother and the white rectangles do not appear
Is there anyway to avoid this? I’ve tried Linux and Mac, getting similar results
Below is the TIFF file and a screenshot of the SVG file that shows the problem.


The code to produce the plots is the following:
x <- 1:5
y <- 1:5
z <- matrix(outer(x,y,"+"),nrow=5)
filled.contour(x,y,z)
filled.contour(x,y,z,color.palette=rainbow)
z2 <- z
z2[5,5] <- Inf
filled.contour(x,y,z2,col=rainbow(100),nlevels=100)
Believe it or not this is an anti-aliasing artifact.
http://r.789695.n4.nabble.com/Suppressing-internal-grid-in-filled-contour-td867081.html
On linux I can reproduce your problem, but when I pass the exact same file created in linux, into a windows OS virtual machine I have running – the SVG image appears fine, so it’s a problem of the viewing software and anti-aliasing settings, not the R output.
I hope this solves your problem.