?D? ear all, I have a matrix with ID of river basins (integer numbers). Now I want to highlight one river basin in a map by plotting only the border. Like the attached figure. Two river basins are highlighted by polygons. It is created by ferret, but I prefer to implement it by R. Anybody know how to do it? Thanks a lot. Cheers, Zun Yin -------------- next part -------------- A non-text attachment was scrubbed... Name: RiverBasin.pdf Type: application/pdf Size: 206726 bytes Desc: not available URL: <https://stat.ethz.ch/pipermail/r-help/attachments/20160804/748038ed/attachment.pdf>
William Dunlap
2016-Aug-04 15:03 UTC
[R] Fwd: only plot borders of a region in a scatter plot
If 'basinID' is the matrix of basin identifiers you could draw an outline of the basin with identifier 'ID' with coutour( basiinID == ID, level=0.5) Add 'add=TRUE' if you are overlaying this on an existing plot. Bill Dunlap TIBCO Software wdunlap tibco.com On Thu, Aug 4, 2016 at 1:51 AM, Zun Yin <yinzun2000 at gmail.com> wrote:> ?D? > ear all, > > I have a matrix with ID of river basins (integer numbers). Now I want to > highlight one river basin in a map by plotting only the border. Like the > attached figure. Two river basins are highlighted by polygons. It is > created by ferret, but I prefer to implement it by R. Anybody know how to > do it? Thanks a lot. > > Cheers, > > Zun Yin > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >[[alternative HTML version deleted]]
Duncan Murdoch
2016-Aug-04 15:08 UTC
[R] Fwd: only plot borders of a region in a scatter plot
On 04/08/2016 11:03 AM, William Dunlap via R-help wrote:> If 'basinID' is the matrix of basin identifiers you could draw an outline > of the basin with identifier 'ID' with > coutour( basiinID == ID, level=0.5)Note the typo: that should be contour( basiinID == ID, level=0.5) Duncan Murdoch> Add 'add=TRUE' if you are overlaying this on an existing plot. > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Thu, Aug 4, 2016 at 1:51 AM, Zun Yin <yinzun2000 at gmail.com> wrote: > >> ?D? >> ear all, >> >> I have a matrix with ID of river basins (integer numbers). Now I want to >> highlight one river basin in a map by plotting only the border. Like the >> attached figure. Two river basins are highlighted by polygons. It is >> created by ferret, but I prefer to implement it by R. Anybody know how to >> do it? Thanks a lot. >> >> Cheers, >> >> Zun Yin >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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. >
Bert Gunter
2016-Aug-04 15:09 UTC
[R] Fwd: only plot borders of a region in a scatter plot
... note the typo. It's: contour( basiinID == ID, level=0.5) :-) -- Bert Bert Gunter "The trouble with having an open mind is that people keep coming along and sticking things into it." -- Opus (aka Berkeley Breathed in his "Bloom County" comic strip ) On Thu, Aug 4, 2016 at 8:03 AM, William Dunlap via R-help <r-help at r-project.org> wrote:> If 'basinID' is the matrix of basin identifiers you could draw an outline > of the basin with identifier 'ID' with > coutour( basiinID == ID, level=0.5) > Add 'add=TRUE' if you are overlaying this on an existing plot. > > Bill Dunlap > TIBCO Software > wdunlap tibco.com > > On Thu, Aug 4, 2016 at 1:51 AM, Zun Yin <yinzun2000 at gmail.com> wrote: > >> D >> ear all, >> >> I have a matrix with ID of river basins (integer numbers). Now I want to >> highlight one river basin in a map by plotting only the border. Like the >> attached figure. Two river basins are highlighted by polygons. It is >> created by ferret, but I prefer to implement it by R. Anybody know how to >> do it? Thanks a lot. >> >> Cheers, >> >> Zun Yin >> >> ______________________________________________ >> R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see >> 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. >> > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help at r-project.org mailing list -- To UNSUBSCRIBE and more, see > 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.