Skip to content

Commit

Permalink
Merge branch 'master' into dev_guide
Browse files Browse the repository at this point in the history
  • Loading branch information
YigitElma authored Oct 21, 2024
2 parents 659bd14 + 84a051b commit 7b721b2
Show file tree
Hide file tree
Showing 5 changed files with 16 additions and 2 deletions.
11 changes: 11 additions & 0 deletions .github/workflows/mpl_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,17 @@ jobs:
- mpl-version: 3.7.0
- mpl-version: 3.7.1
- mpl-version: 3.7.2
- mpl-version: 3.7.3
- mpl-version: 3.7.4
- mpl-version: 3.7.5
- mpl-version: 3.8.0
- mpl-version: 3.8.1
- mpl-version: 3.8.2
- mpl-version: 3.8.3
- mpl-version: 3.8.4
- mpl-version: 3.9.0
- mpl-version: 3.9.2

steps:
- uses: actions/checkout@v4
- name: Set up Python 3.10
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/notebook_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,7 @@ jobs:
source .venv-${{ matrix.python-version }}/bin/activate
python -m pip install --upgrade pip
pip install -r devtools/dev-requirements.txt
pip install matplotlib==3.7.2
- name: Test notebooks with pytest and nbmake
if: env.has_changes == 'true'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/regression_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ jobs:
source .venv-${{ matrix.python-version }}/bin/activate
python -m pip install --upgrade pip
pip install -r devtools/dev-requirements.txt
pip install matplotlib==3.7.2
- name: Set Swap Space
if: env.has_changes == 'true'
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ jobs:
source .venv-${{ matrix.combos.python_version }}/bin/activate
python -m pip install --upgrade pip
pip install -r devtools/dev-requirements.txt
pip install matplotlib==3.7.2
- name: Set Swap Space
if: env.has_changes == 'true'
Expand Down
4 changes: 2 additions & 2 deletions desc/plotting.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,15 +110,15 @@

def _set_tight_layout(fig):
# compat layer to deal with API changes in mpl 3.6.0
if int(matplotlib._version.version.split(".")[1]) < 6:
if int(matplotlib.__version__[0]) == 3 and int(matplotlib.__version__[2]) < 6:
fig.set_tight_layout(True)
else:
fig.set_layout_engine("tight")


def _get_cmap(name, n=None):
# compat layer to deal with API changes in mpl 3.6.0
if int(matplotlib._version.version.split(".")[1]) < 6:
if int(matplotlib.__version__[0]) == 3 and int(matplotlib.__version__[2]) < 6:
return matplotlib.cm.get_cmap(name, n)
else:
c = matplotlib.colormaps[name]
Expand Down

0 comments on commit 7b721b2

Please sign in to comment.