graphics - Plotting a smoothed area on a map from a set of points in R -
How do I plot an area around a set of points on a map in R? For example,
map ('world') map.axes () P & lt; - Matrix (c (50, 50, 80, 100, 70, 40, 25, 60), ncol = 2) # Some points (P, PP = 1, cola = "red") polygon (p, call = "Blue")
... which gives me a polygon at the top in each issue, but it looks worse does any type of polygon in any way in the "smooth" curve is? One option is to surround a polygon with a beijier curve, bezier / Code> Function
HMICC
in the package. Although I can not get the start / end point to connect properly. For example:
## Points to some points - Matrix (c (50, 50, 80, 100, 70, 40, 25, 60), ncol = 2) ## Add End P2 and LT; - Sybind (1: 5, p [c (1: 4,1),]) ## The starting point of linear interpolation between these points is T. Corus & lt; - Seek (1,5,0.05) X (P2 [, 1], P2 [, 3], xout = x (p2 [, 1], p2 [, 2], xout = t.coarse) $ Y y.coarse & lt; t. Coeur) $ y ## A Beige Curve Library (HMICIP) Bees & Lieutenant - Bezier (X Corrers, Y. Corrers) Library Map ('World') Map. Make Axis () polygon (bez $ x), bez $ y, col = RGB (0,0,1,0.5), border = NA)
Comments
Post a Comment