#2021·librosa

Refactor display.py into submodules

Author: bmcfeeCreated May 29, 2026Updated Aug 29, 2026
Labelsdisplay

In the 1.0 dev branch, the display.py submodule is getting to be pretty heavy.

In main (0.11.0), it weighs about 2K lines.

In 1.0.0dev it's currently at 3600, and an upcoming PR #1976 brings this up to over 4K.

This is getting to be pretty unwieldy, and I propose that we split it into the following submodule structure:

  • display/
  • display/formatting.py - axis formatters and decorators, colorbar helpers, etc
  • display/image.py - specshow and related helpers
  • display/signal.py - waveshow, wavebars, etc
  • display/multi.py - multishow, legend aggregator, etc

The refactoring should be invisible to the user and preserve API compatibility.