Skip to content

Commit ab6affd

Browse files
committed
Respect user-input legend facecolor (fixes #402)
1 parent 0b52d12 commit ab6affd

File tree

3 files changed

+4
-1
lines changed

3 files changed

+4
-1
lines changed

WHATSNEW.rst

+2
Original file line numberDiff line numberDiff line change
@@ -247,6 +247,8 @@ Bug fixes
247247
`~proplot.colors.DiscreteColormap` incorrectly samples the color list (:issue:`299`).
248248
* Fix issue where `~proplot.axes.Axes.legend` ignores the user-input `fontsize`
249249
(:issue:`331`).
250+
* Fix issue where `~proplot.axes.Axes.legend` ignores the user-input `facecolor`
251+
but not the shorthand `fc` (:issue:`402`).
250252
* Fix issue where passing invalid rc setting to ``.format`` results in persistent
251253
invalid `rc` state requiring restarting the session/configurator (:issue:`348`).
252254
* Fix issue where ``proplotrc`` settings are ignored if a subsequent line contains

proplot/axes/base.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1605,7 +1605,7 @@ def _parse_frame(guide, fancybox=None, shadow=None, **kwargs):
16051605
kw_frame = _pop_kwargs(
16061606
kwargs,
16071607
alpha=('a', 'framealpha', 'facealpha'),
1608-
facecolor=('fc', 'framecolor', 'facecolor'),
1608+
facecolor=('fc', 'framecolor'),
16091609
edgecolor=('ec',),
16101610
edgewidth=('ew',),
16111611
)

proplot/internals/__init__.py

+1
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,7 @@ def _pop_kwargs(kwargs, *keys, **aliases):
269269
aliases.update({key: () for key in keys})
270270
for key, aliases in aliases.items():
271271
aliases = (aliases,) if isinstance(aliases, str) else aliases
272+
aliases = tuple(alias for alias in aliases if alias != key) # prevent dev errs
272273
opts = {key: kwargs.pop(key, None) for key in (key, *aliases)}
273274
value = _not_none(**opts)
274275
if value is not None:

0 commit comments

Comments
 (0)