Visitar URL original
Matplotlib v3.9 compatibility by C-Achard · Pull Request #3394 · DeepLabCut/DeepLabCut · GitHub
Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
9cc1d18
Add Matplotlib colormap compatibility shim
C-Achard Jul 13, 2026
9518b9d
Allow custom warning stacklevel in deprecated
C-Achard Jul 13, 2026
bd7fdbb
Use shared get_colormap helper everywhere
C-Achard Jul 13, 2026
4bf4921
Merge branch 'main' into cy/init-mpl-version-change
C-Achard Jul 16, 2026
a5d5221
Merge remote-tracking branch 'upstream/main' into cy/init-mpl-version…
deruyter92 Aug 9, 2026
d5945cc
Fix get_colormap_names() legacy fallback to call _legacy_get_colormap…
deruyter92 Aug 9, 2026
d77d4f8
update version for "deprecated since .." warning
deruyter92 Aug 9, 2026
5e739e2
Add name override to deprecated() for legacy shim warnings
deruyter92 Aug 9, 2026
e6cfac6
Rename matplotlib_future_mode.py → matplotlib_compat.py
deruyter92 Aug 9, 2026
d9288fc
add tests for matplotlib compat layer
deruyter92 Aug 9, 2026
350e209
Import matplotlib.cm explicitly in the compat layer
C-Achard Sep 4, 2026
54ac2ac
Prevent duplicate legacy colormap registration
C-Achard Sep 4, 2026
b1c97fb
Route all plt.get_cmap calls throught the compat layer
C-Achard Sep 4, 2026
c1cf140
Use compat helper to clear matplotlib artists
C-Achard Sep 4, 2026
0e4a691
Patch matplotlib's Axes logger by name
C-Achard Sep 4, 2026
d3472c3
Test the name and stacklevel options of @deprecated
C-Achard Sep 4, 2026
0be8837
Expand matplotlib compat test coverage
C-Achard Sep 4, 2026
fe9d488
Remove unused compat helpers
C-Achard Sep 4, 2026
304bcc6
Remove unecessary tests
C-Achard Sep 4, 2026
aa007f6
Rename matplotlib compat module to utils
C-Achard Sep 4, 2026
0584d53
Replace matplotlib_compat colormap helpers
C-Achard Sep 4, 2026
1c15225
Simplify Matplotlib axes logger helper
C-Achard Sep 4, 2026
8a0ea71
Fix Matplotlib artist iteration
C-Achard Sep 4, 2026
426943f
Merge branch 'dev' into cy/init-mpl-version-change
deruyter92 Sep 8, 2026
31380eb
Merge branch 'dev' into cy/init-mpl-version-change
deruyter92 Sep 8, 2026
de29151
Merge branch 'dev' into cy/init-mpl-version-change
deruyter92 Sep 9, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Rename matplotlib_future_mode.py → matplotlib_compat.py
update all import sites accordingly
  • Loading branch information
deruyter92 committed Aug 9, 2026
commit e6cfac6873d79b6ed6d8aea4c2631a85095ebf28
2 changes: 1 addition & 1 deletion deeplabcut/core/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
import matplotlib.pyplot as plt
import numpy as np

from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap


def form_figure(nx, ny) -> tuple[plt.Figure, plt.Axes]:
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/gui/tracklet_toolbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from deeplabcut.refine_training_dataset.tracklets import TrackletManager
from deeplabcut.utils.auxfun_videos import VideoReader
from deeplabcut.utils.auxiliaryfunctions import attempt_to_make_folder
from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap


class DraggablePoint:
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/modelzoo/generalized_data_converter/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
SingleDLC_config,
)
from deeplabcut.utils import auxiliaryfunctions
from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap


def threshold_kpts(config_path, h5path, threshold_mean=0.9, threshold_min=0.1):
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/pose_estimation_3d/plotting3D.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
make_labeled_video,
)
from deeplabcut.utils.auxfun_videos import VideoReader
from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap

matplotlib_axes_logger.setLevel("ERROR")

Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/pose_estimation_pytorch/apis/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from deeplabcut.core.engine import Engine
from deeplabcut.pose_estimation_pytorch.task import Task
from deeplabcut.utils import auxiliaryfunctions
from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap


def create_labeled_images(
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/pose_estimation_tensorflow/visualizemaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
visualize_paf,
visualize_scoremaps,
)
from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap


def extract_maps(
Expand Down
2 changes: 1 addition & 1 deletion deeplabcut/utils/visualization.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
from tqdm import trange

from deeplabcut.utils import auxfun_videos, auxiliaryfunctions
from deeplabcut.utils.matplotlib_future_mode import get_colormap
from deeplabcut.utils.matplotlib_compat import get_colormap


def get_cmap(n: int, name: str = "hsv") -> Colormap:
Expand Down