File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change 18
18
import os
19
19
import re
20
20
import contextlib
21
+ import warnings
21
22
22
23
import matplotlib as mpl
23
24
from matplotlib import cbook
42
43
'savefig.directory' , 'tk.window_focus' , 'hardcopy.docstring' ])
43
44
44
45
45
- def _blacklist_style_params (d ):
46
- return dict ((k , v ) for (k , v ) in d .items () if k not in STYLE_BLACKLIST )
46
+ def _remove_blacklisted_style_params (d ):
47
+ o = {}
48
+ for key , val in d .items ():
49
+ if key in STYLE_BLACKLIST :
50
+ warnings .warn (
51
+ "Style includes a parameter, '{0}', that is not related to "
52
+ "style. Ignoring" .format (key ))
53
+ else :
54
+ o [key ] = val
55
+ return o
47
56
48
57
49
58
def is_style_file (filename ):
@@ -52,7 +61,7 @@ def is_style_file(filename):
52
61
53
62
54
63
def _apply_style (d ):
55
- mpl .rcParams .use (blacklist_style_params (d ))
64
+ mpl .rcParams .use (_remove_blacklisted_style_params (d ))
56
65
57
66
58
67
def use (style ):
You can’t perform that action at this time.
0 commit comments