You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the feeling this gets significantly simpler if you create a list relevant_neighbors containing (angle, node_idx, color). If you reverse sort that (reverse, because plt.pie is counterclockwise starting at the x-axis) and iterate you can populate slices? startangle is then something like sorted_neighbors[0][0]/2. Maybe.
Also, use weights; plt.pie normalizes
E**2 is kind of painful. Probably /way/ more efficient to iterate over nodes with degree>1 and doing an itertools.combinations on their neighbours
The text was updated successfully, but these errors were encountered:
I have the feeling this gets significantly simpler if you create a list relevant_neighbors containing (angle, node_idx, color). If you reverse sort that (reverse, because plt.pie is counterclockwise starting at the x-axis) and iterate you can populate slices? startangle is then something like sorted_neighbors[0][0]/2. Maybe.
Also, use weights; plt.pie normalizes
E**2 is kind of painful. Probably /way/ more efficient to iterate over nodes with degree>1 and doing an itertools.combinations on their neighbours
The text was updated successfully, but these errors were encountered: