I have a list of y coordinates. I want to group points based on adjacent values. The list below would be broken up into two different lists.
106.8
107
107.2
107.4
107.6
120.4
120.6
120.8
121
I have a list of y coordinates. I want to group points based on adjacent values. The list below would be broken up into two different lists.
106.8
107
107.2
107.4
107.6
120.4
120.6
120.8
121
Can you show your list in the graph?
I don’t quite follow. What do you qualify as “adjacent”? If you want to group Y values with the same X coordinate then you should use GroupByKey. If you need to include some sort of “adjacency” you can round your values to your needed tolerance.
I figured it out. I probably did it in my dumb not really a coder way. I’m already grouping the same X values. They python node gives each index a group number and then I count occurences to cut the list where to pattern of .2 feet is broken. I may rewrite it becuase it could just proved the list lengths directly, but when I wrote it I didn’t think thru how I would used the information.