-
Notifications
You must be signed in to change notification settings - Fork 9
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
Group Visualization #7
Comments
Hi, @Luo624! I used a convex hull algorithm to group the members into regions for visualization. I hope the code snippet below is helpful to you. from scipy.spatial import ConvexHull
import matplotlib.pyplot as plt
from matplotlib.patches import Polygon
plt.figure()
r, theta = 16, np.arange(0, 32, 1) / 32 * 2 * np.pi
circle_points = np.column_stack([r * np.cos(theta), r * np.sin(theta)])
group_member = points[indices == group_idx]
group_circle_points = np.concatenate([circle_points + member for member in group_member], axis=0)
hull = ConvexHull(group_circle_points)
point = group_circle_points[hull.vertices]
p = Polygon(point, facecolor='#DCE3E9', edgecolor='#23445D', linewidth=3, zorder=-hull.area)
plt.gca().add_patch(p) |
Hi, InhwanBae! |
Hi, InhwanBae! |
@Luo624 Hi, have you realize the visualization of group? Can you please share the code? Thank you very much!! |
@Pradur241 |
Hello, I am very interested in your work.
I would like to know how it is done in the group visualization piece and what is the name of the graph, I would like to try to plot it but I don't know the name of the graph.
The text was updated successfully, but these errors were encountered: