Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 4673840

Browse filesBrowse files
committed
insert deprecation warning for set_graylevel
1 parent d045fef commit 4673840
Copy full SHA for 4673840

File tree

Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+5
-0
lines changed

‎lib/matplotlib/backend_bases.py

Copy file name to clipboardExpand all lines: lib/matplotlib/backend_bases.py
+5Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1011,6 +1011,11 @@ def set_graylevel(self, frac):
10111011
"""
10121012
Set the foreground color to be a gray level with *frac*
10131013
"""
1014+
# When removing, remember to remove all overrides in subclasses.
1015+
msg = ("set_graylevel is deprecated for removal in 1.6; "
1016+
"you can achieve the same result by using "
1017+
"set_foreground((frac, frac, frac))")
1018+
warnings.warn(msg, mplDeprecation)
10141019
self._rgb = (frac, frac, frac, self._alpha)
10151020

10161021
def set_joinstyle(self, js):

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.