Re: [R] Problem Removing Border Lines in Maps Package
I'm sorry to ask this silly question so long after you posted this response. But I have also been trying to do this. What is the option to draw the outlines the same color as the fill? I'm also using the "spdep" and "maptools" libraries. I have shapefiles for Mexico (counties and read in the spatial lines for the states). This is the code I've been trying to use to plot the map: plot(mex, col=cols[findInterval(mex$nrr95, brks$brks, all.inside=F)], border=0) I know that if I save this plot as a .pdf, the picture will come out fine. However, the file that is saved comes out to be far too large. This is probably due to the fact that there are so many counties in the shape file. And, as the person who asked the original question stated, the resolution of the pdf is higher and, thus, the picture comes out pretty good. But, I want to save these maps as picture files. Would I have to put any other option after the "border=0" option? Thanks, Carlos -- View this message in context: http://r.789695.n4.nabble.com/Problem-Removing-Border-Lines-in-Maps-Package-tp907437p4420282.html Sent from the R help mailing list archive at Nabble.com. __ [email protected] 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.
Re: [R] Problem Removing Border Lines in Maps Package
Have a look at:
map("county", fill=TRUE , col=palette() , resolution=0, lty=0)
HTH,
Ray Brownrigg
Anthony Damico wrote:
I'm working with the nationwide county maps data, and trying to remove the
internal county boundary lines. The only map() function parameter that I've
found that gets me anywhere close to my desired result leaves small white
segments on parts of the map. I believe this is due to the low resolution,
because when I look at individual states, the lty parameter solves the
problem. Does anyone have any idea how I might draw a United States county
map without these white borders making the map look sloppy?
library(maps)
#county map of new jersey, with invisible county borders -- correct example
map("county","new jersey", fill=TRUE , col=palette() , lty=0)
#county map of the united states, with white county borders still visible
some places
map("county", fill=TRUE , col=palette() , lty=0)
Thanks
__
[email protected] 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.
Re: [R] Problem Removing Border Lines in Maps Package
If you don't want the county boundaries, then don't use the county map. There is the state database that does not have county information. If you want the counties different colors, but no dividing lines, then you may want to try the maptools and sp packages (shapefiles for the states/counties is available on the web) which use a different algorithm for storing and drawing the maps and will let you draw the outlines in the same color as the fill. -- Gregory (Greg) L. Snow Ph.D. Statistical Data Center Intermountain Healthcare [email protected] 801.408.8111 > -Original Message- > From: [email protected] [mailto:r-help-boun...@r- > project.org] On Behalf Of Anthony Damico > Sent: Saturday, October 24, 2009 12:40 PM > To: [email protected] > Subject: [R] Problem Removing Border Lines in Maps Package > > I'm working with the nationwide county maps data, and trying to remove > the > internal county boundary lines. The only map() function parameter that > I've > found that gets me anywhere close to my desired result leaves small > white > segments on parts of the map. I believe this is due to the low > resolution, > because when I look at individual states, the lty parameter solves the > problem. Does anyone have any idea how I might draw a United States > county > map without these white borders making the map look sloppy? > > library(maps) > > #county map of new jersey, with invisible county borders -- correct > example > map("county","new jersey", fill=TRUE , col=palette() , lty=0) > > #county map of the united states, with white county borders still > visible > some places > map("county", fill=TRUE , col=palette() , lty=0) > > Thanks > > [[alternative HTML version deleted]] > > __ > [email protected] 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. __ [email protected] 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.
[R] Problem Removing Border Lines in Maps Package
I'm working with the nationwide county maps data, and trying to remove the
internal county boundary lines. The only map() function parameter that I've
found that gets me anywhere close to my desired result leaves small white
segments on parts of the map. I believe this is due to the low resolution,
because when I look at individual states, the lty parameter solves the
problem. Does anyone have any idea how I might draw a United States county
map without these white borders making the map look sloppy?
library(maps)
#county map of new jersey, with invisible county borders -- correct example
map("county","new jersey", fill=TRUE , col=palette() , lty=0)
#county map of the united states, with white county borders still visible
some places
map("county", fill=TRUE , col=palette() , lty=0)
Thanks
[[alternative HTML version deleted]]
__
[email protected] 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.

