Skip to content

Commit 6629efb

Browse files
committed
Remove panel_kw from colorbar/legend_wrapper
1 parent 16ae44f commit 6629efb

File tree

1 file changed

+8
-20
lines changed

1 file changed

+8
-20
lines changed

proplot/wrappers.py

Lines changed: 8 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1388,7 +1388,6 @@ def cycle_changer(
13881388
label=None, labels=None, values=None,
13891389
legend=None, legend_kw=None,
13901390
colorbar=None, colorbar_kw=None,
1391-
panel_kw=None,
13921391
**kwargs):
13931392
"""
13941393
Wraps methods that use the property cycler (%(methods)s),
@@ -1432,10 +1431,6 @@ def cycle_changer(
14321431
colorbar_kw : dict-like, optional
14331432
Ignored if `colorbar` is ``None``. Extra keyword args for our call
14341433
to `~proplot.axes.Axes.colorbar`.
1435-
panel_kw : dict-like, optional
1436-
Dictionary of keyword arguments passed to
1437-
`~proplot.axes.Axes.panel`, if you are generating an
1438-
on-the-fly panel.
14391434
14401435
Other parameters
14411436
----------------
@@ -1457,7 +1452,6 @@ def cycle_changer(
14571452
cycle_kw = cycle_kw or {}
14581453
legend_kw = legend_kw or {}
14591454
colorbar_kw = colorbar_kw or {}
1460-
panel_kw = panel_kw or {}
14611455

14621456
# Test input
14631457
# NOTE: Requires standardize_1d wrapper before reaching this. Also note
@@ -1619,12 +1613,12 @@ def cycle_changer(
16191613
# Add colorbar and/or legend
16201614
if colorbar:
16211615
# Add handles
1622-
panel_kw.setdefault('mode', 'colorbar')
1623-
loc = self._loc_translate(colorbar, **panel_kw)
1616+
loc = self._loc_translate(colorbar)
16241617
if not isinstance(loc, str):
16251618
raise ValueError(
16261619
f'Invalid on-the-fly location {loc!r}. '
1627-
'Must be a preset location. See Axes.colorbar')
1620+
'Must be a preset location. See Axes.colorbar'
1621+
)
16281622
if loc not in self._auto_colorbar:
16291623
self._auto_colorbar[loc] = ([], {})
16301624
self._auto_colorbar[loc][0].extend(objs)
@@ -1636,12 +1630,12 @@ def cycle_changer(
16361630
self._auto_colorbar[loc][1].update(colorbar_kw)
16371631
if legend:
16381632
# Add handles
1639-
panel_kw.setdefault('mode', 'legend')
1640-
loc = self._loc_translate(legend, **panel_kw)
1633+
loc = self._loc_translate(legend)
16411634
if not isinstance(loc, str):
16421635
raise ValueError(
16431636
f'Invalid on-the-fly location {loc!r}. '
1644-
'Must be a preset location. See Axes.legend')
1637+
'Must be a preset location. See Axes.legend'
1638+
)
16451639
if loc not in self._auto_legend:
16461640
self._auto_legend[loc] = ([], {})
16471641
self._auto_legend[loc][0].extend(objs)
@@ -1671,7 +1665,7 @@ def cmap_changer(
16711665
N=None, levels=None, values=None, centers=None, vmin=None, vmax=None,
16721666
locator=None, symmetric=False, locator_kw=None,
16731667
edgefix=None, labels=False, labels_kw=None, fmt=None, precision=2,
1674-
colorbar=False, colorbar_kw=None, panel_kw=None,
1668+
colorbar=False, colorbar_kw=None,
16751669
lw=None, linewidth=None, linewidths=None,
16761670
ls=None, linestyle=None, linestyles=None,
16771671
color=None, colors=None, edgecolor=None, edgecolors=None,
@@ -1766,10 +1760,6 @@ def cmap_changer(
17661760
colorbar_kw : dict-like, optional
17671761
Ignored if `colorbar` is ``None``. Extra keyword args for our call
17681762
to `~proplot.axes.Axes.colorbar`.
1769-
panel_kw : dict-like, optional
1770-
Dictionary of keyword arguments passed to
1771-
`~proplot.axes.Axes.panel`, if you are generating an
1772-
on-the-fly panel.
17731763
17741764
Other parameters
17751765
----------------
@@ -1813,7 +1803,6 @@ def cmap_changer(
18131803
locator_kw = locator_kw or {}
18141804
labels_kw = labels_kw or {}
18151805
colorbar_kw = colorbar_kw or {}
1816-
panel_kw = panel_kw or {}
18171806

18181807
# Parse args
18191808
# Disable edgefix=True for certain keyword combos e.g. if user wants
@@ -2113,8 +2102,7 @@ def cmap_changer(
21132102

21142103
# Add colorbar
21152104
if colorbar:
2116-
panel_kw.setdefault('mode', 'colorbar')
2117-
loc = self._loc_translate(colorbar, **panel_kw)
2105+
loc = self._loc_translate(colorbar)
21182106
if not isinstance(loc, str):
21192107
raise ValueError(
21202108
f'Invalid on-the-fly location {loc!r}. '

0 commit comments

Comments
 (0)