Skip to content

fix: replace plt.style.use('seaborn') with 'seaborn-v0_8' for matplotlib 3.6+ compatibility#9

Open
aqn96 wants to merge 1 commit into
In-Network-Machine-Learning:mainfrom
aqn96:fix/matplotlib-seaborn-style
Open

fix: replace plt.style.use('seaborn') with 'seaborn-v0_8' for matplotlib 3.6+ compatibility#9
aqn96 wants to merge 1 commit into
In-Network-Machine-Learning:mainfrom
aqn96:fix/matplotlib-seaborn-style

Conversation

@aqn96

@aqn96 aqn96 commented Mar 16, 2026

Copy link
Copy Markdown

Summary

Fix a matplotlib deprecation/breakage across 15 table_generator.py files in the DT, NN, and XGB modules.

Root Cause

Matplotlib 3.6 deprecated the 'seaborn' style name, and matplotlib 3.8+ removed it entirely. On modern environments (e.g., Ubuntu 24.04 with Python 3.12 and matplotlib 3.10), plt.style.use('seaborn') raises:

OSError: 'seaborn' not found in the style library

Fix

Replace plt.style.use('seaborn') with plt.style.use('seaborn-v0_8'), which is the renamed style and is compatible with both older and current matplotlib versions.

Affected Files

15 table_generator.py files across DT (6), NN (3), and XGB (6) modules.

Tested

  • Python 3.12, matplotlib 3.10.8, Ubuntu 24.04 ARM
  • DT/Type_4 end-to-end through BMv2 deployment on Iris dataset

Related: #8
See also: #7 (pandas fix for the same outdated dependency issue)

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.

1 participant