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

Accomodate hull alternative visual for 2-point clusters #3

Open
patcon opened this issue Jan 25, 2025 · 0 comments
Open

Accomodate hull alternative visual for 2-point clusters #3

patcon opened this issue Jan 25, 2025 · 0 comments

Comments

@patcon
Copy link
Member

patcon commented Jan 25, 2025

This error gets generated by QHull/scipy if trying to draw hull for less than 3 points. I've update code to skip 2-point hulls, so error won't show up.

[/usr/local/lib/python3.11/dist-packages/reddwarf/polis_pandas.py](https://localhost:8080/#) in generate_figure(self, coord_dataframe, labels)
    240                 if len(points) < 2:
    241                     continue
--> 242                 hull = ConvexHull(points)
    243                 hull_points = points.iloc[hull.vertices, :]
    244                 polygon = patches.Polygon(

_qhull.pyx in scipy.spatial._qhull.ConvexHull.__init__()

_qhull.pyx in scipy.spatial._qhull._Qhull.__init__()

QhullError: QH6214 qhull input error: not enough points(2) to construct initial simplex (need 3)

While executing:  | qhull i Qt
Options selected for Qhull 2019.1.r 2019/06/21:
  run-id 909967059  incidence  Qtriangulate  _pre-merge  _zero-centrum
  _maxoutside  0

Polis platform seems to avoid singleton 1-point clusters, but 2 can appear, and still need a visual to connect them.

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

No branches or pull requests

1 participant