7 if(
'matplotlib.backends' not in sys.modules
and 8 (os.getenv(
"DISPLAY")
is None or 9 os.getenv(
"DISPLAY") ==
"")):
18 warnings.filterwarnings(action=
"ignore",
19 message=
".*gdk_cursor_new_for_display: assertion `GDK_IS_DISPLAY \\(display\\)' failed.*")
20 warnings.filterwarnings(action=
"ignore",
21 message=
".*could not open display.*")
22 import matplotlib.pyplot
as plt
23 except (RuntimeError, ImportError):
25 matplotlib.use(
'agg', warn=
False, force=
True)
26 import matplotlib.pyplot
as plt
29 warnings.filters.pop(0)
30 warnings.filters.pop(0)