Commit ecd8254d023be1f11bdb4d1d4bf86cc1ce622c39
1 parent
d9b8269c
Check also opening of figure in matplotlib test
Showing
6 changed files
with
13 additions
and
1 deletions
examples/make_spectrum.py
examples/show_butterfly.py
examples/show_model.py
examples/show_pha.py
| ... | ... | @@ -23,6 +23,8 @@ import math |
| 23 | 23 | import gammalib |
| 24 | 24 | try: |
| 25 | 25 | import matplotlib.pyplot as plt |
| 26 | + plt.figure() | |
| 27 | + plt.close() | |
| 26 | 28 | except: |
| 27 | 29 | print('This script needs the "matplotlib" module') |
| 28 | 30 | sys.exit() |
| ... | ... | @@ -68,7 +70,7 @@ def show_pha(pha, plotfile=''): |
| 68 | 70 | plt.semilogy(energy, counts, 'ro') |
| 69 | 71 | else: |
| 70 | 72 | plt.loglog(energy, counts, 'ro') |
| 71 | - plt.errorbar(energy, counts, error, fmt=None, ecolor='r') | |
| 73 | + plt.errorbar(energy, counts, error, fmt='none', ecolor='r') | |
| 72 | 74 | |
| 73 | 75 | # Set axes |
| 74 | 76 | if channels: | ... | ... |
examples/show_pull_evolution.py
examples/show_pull_histogram.py