Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

convexhull issue #21

Open
pamdla opened this issue Mar 13, 2017 · 1 comment
Open

convexhull issue #21

pamdla opened this issue Mar 13, 2017 · 1 comment

Comments

@pamdla
Copy link

pamdla commented Mar 13, 2017

Hi, I had this problem while using KMeansLayer:
raise Exception('convexhull requires at least 3 points')
how can I use it?

ps: my data file is a txt file, and it has three columns (id, lon, lat).

@andrea-cuttone
Copy link
Owner

convexhull does require at least 3 points

Try modifying kmeans.py

for l in set(labels):
        self.painter.set_color(self.cmap[l])
        if len(x[labels == l]) >= 3:
            self.painter.convexhull(x[labels == l], y[labels == l])
        self.painter.points(x[labels == l], y[labels == l], 2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants