Skip to content

Commit c2c5c58

Browse files
committed
Permit legend=True and colorbar=True for plot commands
1 parent 2663619 commit c2c5c58

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

proplot/wrappers.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1650,7 +1650,7 @@ def cycle_changer(
16501650
# Add colorbar and/or legend
16511651
if colorbar:
16521652
# Add handles
1653-
loc = self._loc_translate(colorbar)
1653+
loc = self._loc_translate(colorbar, rc['colorbar.loc'])
16541654
if not isinstance(loc, str):
16551655
raise ValueError(
16561656
f'Invalid on-the-fly location {loc!r}. '
@@ -1667,7 +1667,7 @@ def cycle_changer(
16671667
self._auto_colorbar[loc][1].update(colorbar_kw)
16681668
if legend:
16691669
# Add handles
1670-
loc = self._loc_translate(legend)
1670+
loc = self._loc_translate(legend, rc['legend.loc'])
16711671
if not isinstance(loc, str):
16721672
raise ValueError(
16731673
f'Invalid on-the-fly location {loc!r}. '
@@ -2144,7 +2144,7 @@ def cmap_changer(
21442144

21452145
# Add colorbar
21462146
if colorbar:
2147-
loc = self._loc_translate(colorbar)
2147+
loc = self._loc_translate(colorbar, rc['colorbar.loc'])
21482148
if not isinstance(loc, str):
21492149
raise ValueError(
21502150
f'Invalid on-the-fly location {loc!r}. '

0 commit comments

Comments
 (0)