Commit 08eb3674d457591178351d0d1f1f02a32703fb73

Authored by knodlseder
1 parent 4cd10143

correctly detect matplotlib

Showing 1 changed file with 3 additions and 4 deletions
test/example_unbinned.py
@@ -203,8 +203,7 @@ def plot_counts(observations): @@ -203,8 +203,7 @@ def plot_counts(observations):
203 Plot counts. 203 Plot counts.
204 """ 204 """
205 # Only proceed if matplotlib is available 205 # Only proceed if matplotlib is available
206 - if 0 == 0:  
207 - #try: 206 + try:
208 # Import matplotlib 207 # Import matplotlib
209 import matplotlib.pyplot as plt 208 import matplotlib.pyplot as plt
210 209
@@ -338,8 +337,8 @@ def plot_counts(observations): @@ -338,8 +337,8 @@ def plot_counts(observations):
338 # Show counts spectra 337 # Show counts spectra
339 plt.show() 338 plt.show()
340 339
341 - #except:  
342 - # print "Matplotlib is not (correctly) installed on your system. No counts spectra are shown." 340 + except:
  341 + print "Matplotlib is not (correctly) installed on your system. No counts spectra are shown."
343 342
344 # Return 343 # Return
345 return 344 return