Skip to content

Fix matplotlib 3.9+ incompatibility in pymnet_style visualization#1378

Merged
SkBlaz merged 2 commits into
masterfrom
copilot/fix-run-examples-job
Jun 12, 2026
Merged

Fix matplotlib 3.9+ incompatibility in pymnet_style visualization#1378
SkBlaz merged 2 commits into
masterfrom
copilot/fix-run-examples-job

Conversation

Copilot AI commented Jun 12, 2026

Copy link
Copy Markdown
Contributor

matplotlib.cm.get_cmap() was removed in matplotlib 3.9, breaking the draw_multilayer_pymnet visualization and causing the run-examples (3.11) CI job to fail.

Changes

  • py3plex/visualization/pymnet_style.py: Replace all 3 calls to plt.cm.get_cmap(name) with mpl.colormaps[name] — the modern API available since matplotlib 3.5, consistent with the existing import matplotlib as mpl in the file.
# Before (removed in matplotlib 3.9)
cmap = plt.cm.get_cmap('tab10')

# After
cmap = mpl.colormaps['tab10']

Affected code paths: node coloring by layer (×2) and by degree (×1) inside _get_node_colors.

Copilot AI changed the title [WIP] Fix failing GitHub Actions job run-examples (3.11) Fix matplotlib 3.9+ incompatibility in pymnet_style visualization Jun 12, 2026
Copilot AI requested a review from SkBlaz June 12, 2026 10:34
@SkBlaz SkBlaz marked this pull request as ready for review June 12, 2026 12:02
@SkBlaz SkBlaz merged commit cb023f7 into master Jun 12, 2026
37 checks passed
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

Successfully merging this pull request may close these issues.

2 participants