We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fa3f5f5 commit 22a8fcfCopy full SHA for 22a8fcf
lib/matplotlib/tests/test_rcparams.py
@@ -654,3 +654,21 @@ def test_rcparams_path_sketch_from_file(tmp_path, value):
654
rc_path.write_text(f"path.sketch: {value}")
655
with mpl.rc_context(fname=rc_path):
656
assert mpl.rcParams["path.sketch"] == (1, 2, 3)
657
+
658
659
+@pytest.mark.parametrize('group, option, alias, value', [
660
+ ('lines', 'linewidth', 'lw', 3),
661
+ ('lines', 'linestyle', 'ls', 'dashed'),
662
+ ('lines', 'color', 'c', 'white'),
663
+ ('axes', 'facecolor', 'fc', 'black'),
664
+ ('figure', 'edgecolor', 'ec', 'magenta'),
665
+ ('lines', 'markeredgewidth', 'mew', 1.5),
666
+ ('patch', 'antialiased', 'aa', False),
667
+ ('font', 'sans-serif', 'sans', ["Verdana"])
668
+])
669
+def test_rc_aliases(group, option, alias, value):
670
+ rc_kwargs = {alias: value,}
671
+ mpl.rc(group, **rc_kwargs)
672
673
+ rcParams_key = f"{group}.{option}"
674
+ assert mpl.rcParams[rcParams_key] == value
0 commit comments