Skip to content

Commit 593c509

Browse files
committed
Add "c" as alias for "color" for Collections
... for consistency with Line2D, as well as the already existing "ec" and "fc" aliases for "edgecolor" and "facecolor".
1 parent 72cad98 commit 593c509

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
`Collection` gained the ``c`` alias for the ``color`` property
2+
``````````````````````````````````````````````````````````````
3+
4+
For consistency with functions returning `Line2D`\s (e.g. `~Axes.plot`), the
5+
color of the artists returned by functions returning `Collection` subclasses
6+
(e.g. `~Axes.fill_between`) can now be set using the ``c`` shorthand (e.g.
7+
``ax.fill_between(..., c="red")``).

lib/matplotlib/collections.py

+1
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121

2222
@cbook._define_aliases({
2323
"antialiased": ["antialiaseds", "aa"],
24+
"color": ["c"],
2425
"edgecolor": ["edgecolors", "ec"],
2526
"facecolor": ["facecolors", "fc"],
2627
"linestyle": ["linestyles", "dashes", "ls"],

0 commit comments

Comments
 (0)