Commit bcdc45a68e5edd15cf55295b65c7732bdff3b2d9
1 parent
b680aa1e
Change matplotlib commands in show_residuals.py
Showing
1 changed file
with
8 additions
and
2 deletions
examples/show_residuals.py
| ... | ... | @@ -208,13 +208,19 @@ def plot_residuals(filename, plotfile, hdu): |
| 208 | 208 | # Initialise figure |
| 209 | 209 | axarr = [] |
| 210 | 210 | if is_onoff: |
| 211 | - f, ((ax1, ax2), (ax3, ax4)) = plt.subplots(2, 2, sharex='col', sharey='row') | |
| 211 | + f = plt.figure(figsize=(10,6)) | |
| 212 | + ax1 = f.add_subplot(221) | |
| 213 | + ax2 = f.add_subplot(222) | |
| 214 | + ax3 = f.add_subplot(223) | |
| 215 | + ax4 = f.add_subplot(224) | |
| 212 | 216 | axarr.append(ax1) |
| 213 | 217 | axarr.append(ax2) |
| 214 | 218 | axarr.append(ax3) |
| 215 | 219 | axarr.append(ax4) |
| 216 | 220 | else: |
| 217 | - f, (ax1, ax2) = plt.subplots(2, sharex=True) | |
| 221 | + f = plt.figure() | |
| 222 | + ax1 = f.add_subplot(211) | |
| 223 | + ax2 = f.add_subplot(212) | |
| 218 | 224 | axarr.append(ax1) |
| 219 | 225 | axarr.append(ax2) |
| 220 | 226 | f.subplots_adjust(hspace=0) | ... | ... |