[R] outlining data points

lana eve.ilana at gmail.com
Sat Jun 4 01:20:03 CEST 2011


Hi,
     I have tried numerous methods and packages, but thus far cannot seem to
find a solution. I am looking to essentially draw a filled colored shape
around subsets on my data points on a scatter plot where none of the shapes
overlap but instead bend around each other if necessary. I finally came up
with the following steps which approximate what I am looking for, but I am
completely lost as to how to implement several of the steps. The steps are
listed below, along with a pictorial representation of what I am hoping they
will achieve. Any suggestions would be greatly appreciated.

1. Draw a circle of a give radius around each data point 
	radius can be the same for each point, or can be determined by a vector of
values either the same length of the number of points or is repeated until
all points are assigned
2. Begin with the area of greatest overlap between two circles, draw a line
segment between the two intersection points and assign either side of that
line to its respective shape
3. Repeat with largest remaining area of overlap. If a previous division has
left an intersection point within the new area of overlap, such that there
are now two possible points to attach the line segment to, use the one from
which a division has already been drawn (so that three shapes now come
together in a point)
4. Repeat with successively smaller areas of overlap until no remain
5. Fill each resulting shape with a color determined by an outside vector
associated with the points
6. (if possible) calculate the area of each resultant shape

http://r.789695.n4.nabble.com/file/n3572306/diagram_circles_coloring_3.png 

http://r.789695.n4.nabble.com/file/n3572306/circle_interactions_3.png 

--
View this message in context: http://r.789695.n4.nabble.com/outlining-data-points-tp3572306p3572306.html
Sent from the R help mailing list archive at Nabble.com.



More information about the R-help mailing list