Skip to content

Commit 5e9ff21

Browse files
committed
Undo black string formatting
1 parent 29bc955 commit 5e9ff21

File tree

5 files changed

+15
-4
lines changed

5 files changed

+15
-4
lines changed

proplot/axes/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1144,7 +1144,7 @@ def _add_colorbar(
11441144
mappable, cax=cax, ticks=locator, format=formatter,
11451145
drawedges=grid, extendfrac=extendfrac, **kwargs
11461146
)
1147-
obj.minorlocator = minorlocator # backwards compatibility
1147+
# obj.minorlocator = minorlocator # backwards compatibility NOTE: NOT sure what this does
11481148
obj.update_ticks = guides._update_ticks.__get__(obj) # backwards compatible
11491149
if minorlocator is not None:
11501150
obj.update_ticks()

proplot/config.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -452,6 +452,8 @@ def register_cmaps(*args, user=None, local=None, default=False):
452452
"""
453453
# Register input colormaps
454454
from . import colors as pcolors
455+
456+
import matplotlib as mpl
455457
user = _not_none(user, not bool(args)) # skip user folder if input args passed
456458
local = _not_none(local, not bool(args))
457459
paths = []
@@ -471,6 +473,10 @@ def register_cmaps(*args, user=None, local=None, default=False):
471473
if i == 0 and cmap.name.lower() in pcolors.CMAPS_CYCLIC:
472474
cmap.set_cyclic(True)
473475
pcolors._cmap_database[cmap.name] = cmap
476+
# for mpl >= 3.7.2
477+
if hasattr(mpl, "colormaps"):
478+
mpl.colormaps.register(cmap)
479+
474480

475481

476482
@docstring._snippet_manager

proplot/figure.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -888,7 +888,7 @@ def _get_renderer(self):
888888
"""
889889
Get a renderer at all costs. See matplotlib's tight_layout.py.
890890
"""
891-
if self._cachedRenderer:
891+
if hasattr(self, "_cached_renderer"):
892892
renderer = self._cachedRenderer
893893
else:
894894
canvas = self.canvas

proplot/internals/rcsetup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,19 @@
77
from collections.abc import MutableMapping
88
from numbers import Integral, Real
99

10+
import matplotlib as mpl
1011
import matplotlib.rcsetup as msetup
1112
import numpy as np
1213
from cycler import Cycler
1314
from matplotlib import RcParams
1415
from matplotlib import rcParamsDefault as _rc_matplotlib_native
1516
from matplotlib.colors import Colormap
1617
from matplotlib.font_manager import font_scalings
17-
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
18+
19+
if hasattr(mpl, "_fontconfig_pattern"):
20+
from matplotlib._fontconfig_pattern import parse_fontconfig_pattern
21+
else:
22+
from matplotlib.fontconfig_pattern import parse_fontconfig_pattern
1823

1924
from . import ic # noqa: F401
2025
from . import warnings

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,6 @@ project_urls =
2727

2828
[options]
2929
packages = proplot
30-
install_requires = matplotlib>=3.0.0,<3.6.0
30+
install_requires = matplotlib>=3.0.0,<=3.8.0
3131
include_package_data = True
3232
python_requires = >=3.6.0

0 commit comments

Comments
 (0)