File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -68,16 +68,22 @@ def load_mplstyle():
6868 plt = importlib .import_module ('matplotlib.pyplot' )
6969 if conf .plot .mplstyle :
7070 for style in conf .plot .mplstyle .split ():
71+ found = False
7172 if not ISOLATED :
7273 stfile = config .CONFIG_DIR / (style + '.mplstyle' )
74+ if stfile .is_file ():
75+ found = True
76+ style = str (stfile )
77+ if not found :
78+ # try local version
79+ stfile = pathlib .Path (__file__ ).parent / (style + '.mplstyle' )
7380 if stfile .is_file ():
7481 style = str (stfile )
7582 try :
7683 plt .style .use (style )
7784 except OSError :
78- if not ISOLATED or DEBUG :
79- print ('Cannot import style {}.' .format (style ),
80- file = sys .stderr )
85+ print ('Cannot import style {}.' .format (style ),
86+ file = sys .stderr )
8187 conf .plot .mplstyle = ''
8288 if conf .plot .xkcd :
8389 plt .xkcd ()
You can’t perform that action at this time.
0 commit comments