Commit 93ad6b15 authored by Leo Pound Singer's avatar Leo Pound Singer Committed by Adam Mercer
Browse files

Be more emphatic about switching matplotlib backend

(cherry picked from commit 78b44c14f1adeab6981445bd90dc91e894590772)
Original: b3b385f2c88f099b3ec9254bd0415061068b10bb
parent d0f191e2
......@@ -41,7 +41,11 @@ from ..plot import cmap
# Set no-op Matplotlib backend to defer importing anything that requires a GUI
# until we have determined that it is necessary based on the command line
# arguments.
matplotlib.use('Template')
if 'matplotlib.pyplot' in sys.modules:
from matplotlib import pyplot as plt
plt.switch_backend('Template')
else:
matplotlib.use('Template', warn=False, force=True)
@contextlib.contextmanager
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment