Skip to content

Commit feecb27

Browse files
authored
Merge pull request matplotlib#30532 from timhoffm/listedcolormap-name
MNT: Change default name of ListedColormaps
2 parents 75e7802 + c6210d8 commit feecb27

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Default name of ``ListedColormap``
2+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
3+
4+
The default name of `.ListedColormap` has changed from "from_list" to "unnamed".

lib/matplotlib/colors.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1322,7 +1322,7 @@ class ListedColormap(Colormap):
13221322
"and will be removed in %(removal)s. Please ensure the list "
13231323
"of passed colors is the required length instead."
13241324
)
1325-
def __init__(self, colors, name='from_list', N=None, *,
1325+
def __init__(self, colors, name='unnamed', N=None, *,
13261326
bad=None, under=None, over=None):
13271327
if N is None:
13281328
self.colors = colors

0 commit comments

Comments
 (0)