Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 23dd2ad

Browse files
anntzertimhoffm
authored andcommitted
Keep Collections and Patches property aliases in sync. (#12851)
I know there's some desire to completely get rid of the shorthand aliases, but until this happens, it seems better to have the same aliases available for all classes when that makes sense (and this won't make the deprecation period, if it happens, any harder).
1 parent 7b3e34c commit 23dd2ad

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

lib/matplotlib/collections.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@
2121

2222

2323
@cbook._define_aliases({
24-
"antialiased": ["antialiaseds"],
25-
"edgecolor": ["edgecolors"],
26-
"facecolor": ["facecolors"],
27-
"linestyle": ["linestyles", "dashes"],
24+
"antialiased": ["antialiaseds", "aa"],
25+
"edgecolor": ["edgecolors", "ec"],
26+
"facecolor": ["facecolors", "fc"],
27+
"linestyle": ["linestyles", "dashes", "ls"],
2828
"linewidth": ["linewidths", "lw"],
2929
})
3030
class Collection(artist.Artist, cm.ScalarMappable):

lib/matplotlib/patches.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
"antialiased": ["aa"],
2121
"edgecolor": ["ec"],
2222
"facecolor": ["fc"],
23-
"linewidth": ["lw"],
2423
"linestyle": ["ls"],
24+
"linewidth": ["lw"],
2525
})
2626
class Patch(artist.Artist):
2727
"""

0 commit comments

Comments
 (0)