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

AttributeError: 'PathCollection' object has no attribute 'set_offset_position' #15

Open
RylanSchaeffer opened this issue Oct 9, 2023 · 1 comment

Comments

@RylanSchaeffer
Copy link

I posted a previous bug: #14

Once one makes my suggested change, you hit another error:

File ~/miniconda3/lib/python3.10/site-packages/communities/visualization/draw_communities.py:161, in draw_community_patches(nodes, communities, axes)
    160 def draw_community_patches(nodes, communities, axes):
--> 161     node_coordinates = _node_coordinates(nodes)
    162     vertex_sets = []
    163     for c_i, community in enumerate(communities):

File ~/miniconda3/lib/python3.10/site-packages/communities/visualization/draw_communities.py:89, in _node_coordinates(nodes)
     87 def _node_coordinates(nodes):
     88     collection = copy(nodes)
---> 89     collection.set_offset_position("data")
     90     return collection.get_offsets()

AttributeError: 'PathCollection' object has no attribute 'set_offset_position'

It seems like there's some issue with plotly to matplotlib? See: https://stackoverflow.com/a/73878334

@recalcitrantsupplant
Copy link

recalcitrantsupplant commented Jun 12, 2024

Collection.set_offset_position and Collection.get_offset_position have been removed; the offset_position of the Collection class is now "screen"

https://matplotlib.org/stable/api/prev_api_changes/api_changes_3.5.0.html

I've just commented the line out.

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