Skip to content

Commit

Permalink
Update visualize_and_compare_testing_models.py
Browse files Browse the repository at this point in the history
  • Loading branch information
kousu committed May 18, 2022
1 parent 23e018f commit b226a7a
Showing 1 changed file with 1 addition and 15 deletions.
16 changes: 1 addition & 15 deletions ivadomed/scripts/visualize_and_compare_testing_models.py
Expand Up @@ -21,21 +21,7 @@

matplotlib.rcParams['toolbar'] = 'None' # Remove buttons

gui_env = ['Agg']
selected_gui_env = []
for gui in gui_env:
try:
matplotlib.use(gui)
from matplotlib import pyplot as plt

selected_gui_env = gui
break
except:
continue
# If none works
if selected_gui_env == []:
from matplotlib import pyplot as plt

if matplotlib.get_backend() == "agg":
logger.warning("No backend can be used - Visualization will fail")
else:
logger.info(f"Using: {matplotlib.get_backend()} gui")
Expand Down

0 comments on commit b226a7a

Please sign in to comment.