On Fri, Jan 13, 2012 at 1:52 PM, Dimitri Liakhovitski <dimitri.liakhovit...@gmail.com> wrote: > Just to clarify, according to help about the "fill" argument: > logical flag that says whether to draw lines or fill areas. If FALSE, > the lines bounding each region will be drawn (but only once, for > interior lines). If TRUE, each region will be filled using colors from > the col = argument, and bounding lines will not be drawn. > We have fill=TRUE - so why are the county borders still drawn? > Thank you! > Dimitri >
This prompted me to check the code: if fill=TRUE, map() calls polygon() if fill=FALSE, map() calls lines() But polygon() draws borders by default. > plot(c(0,1), c(0,1), type="n") > polygon(c(0,0,1,1), c(0,1,1,0), col="yellow") To not draw borders, the border argument is provided: > plot(c(0,1), c(0,1), type="n") > polygon(c(0,0,1,1), c(0,1,1,0), col="yellow", border=NA) But that fails in map(): > map('county', 'iowa', fill=TRUE, col=rainbow(20), border=NA) Error in par(pin = p) : invalid value specified for graphical parameter "pin" because border is used as a named argument in map() already, for setting the size of the plot area, so there's no way to alter the border argument to polygon. The work-around I suggested previous (lty=0) seems to be the only way to deal with the problem. Sarah ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.