We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 278f531 commit 860ff81Copy full SHA for 860ff81
stagpy/__init__.py
@@ -72,7 +72,7 @@ def _check_config() -> None:
72
73
def load_mplstyle() -> None:
74
"""Try to load conf.plot.mplstyle matplotlib style."""
75
- import matplotlib.pyplot as plt
+ import matplotlib.style as mpls
76
if conf.plot.mplstyle:
77
for style in conf.plot.mplstyle.split():
78
found = False
@@ -87,11 +87,12 @@ def load_mplstyle() -> None:
87
if stfile.is_file():
88
style = str(stfile)
89
try:
90
- plt.style.use(style)
+ mpls.use(style)
91
except OSError:
92
print(f'Cannot import style {style}.', file=sys.stderr)
93
conf.plot.mplstyle = ''
94
if conf.plot.xkcd:
95
+ import matplotlib.pyplot as plt
96
plt.xkcd()
97
98
0 commit comments