Commit 08eb3674d457591178351d0d1f1f02a32703fb73
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 | 203 | Plot counts. |
| 204 | 204 | """ |
| 205 | 205 | # Only proceed if matplotlib is available |
| 206 | - if 0 == 0: | |
| 207 | - #try: | |
| 206 | + try: | |
| 208 | 207 | # Import matplotlib |
| 209 | 208 | import matplotlib.pyplot as plt |
| 210 | 209 | |
| ... | ... | @@ -338,8 +337,8 @@ def plot_counts(observations): |
| 338 | 337 | # Show counts spectra |
| 339 | 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 | 343 | # Return |
| 345 | 344 | return | ... | ... |