diff --git a/doc/users/next_whats_new/2019-02-17-AL.rst b/doc/users/next_whats_new/2019-02-17-AL.rst new file mode 100644 index 000000000000..ff703ffedcf6 --- /dev/null +++ b/doc/users/next_whats_new/2019-02-17-AL.rst @@ -0,0 +1,8 @@ +`Collection` gained the ``c`` alias for the ``color`` property +`````````````````````````````````````````````````````````````` + +For consistency with functions returning `Line2D`\s (e.g. `~Axes.plot`), the +color of the artists returned by functions returning `Collection` subclasses +(e.g. `~Axes.fill_between`) can now be set using the ``c`` shorthand (e.g. +``ax.fill_between(..., c="red")``) -- except for `~Axes.scatter`, which already +has a ``c`` parameter. diff --git a/lib/matplotlib/collections.py b/lib/matplotlib/collections.py index af6f8ed12a98..86cae697e0aa 100644 --- a/lib/matplotlib/collections.py +++ b/lib/matplotlib/collections.py @@ -21,6 +21,7 @@ @cbook._define_aliases({ "antialiased": ["antialiaseds", "aa"], + "color": ["c"], "edgecolor": ["edgecolors", "ec"], "facecolor": ["facecolors", "fc"], "linestyle": ["linestyles", "dashes", "ls"],