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,13 +208,19 @@ def plot_residuals(filename, plotfile, hdu): | ||
| 208 | # Initialise figure | 208 | # Initialise figure |
| 209 | axarr = [] | 209 | axarr = [] |
| 210 | if is_onoff: | 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 | axarr.append(ax1) | 216 | axarr.append(ax1) |
| 213 | axarr.append(ax2) | 217 | axarr.append(ax2) |
| 214 | axarr.append(ax3) | 218 | axarr.append(ax3) |
| 215 | axarr.append(ax4) | 219 | axarr.append(ax4) |
| 216 | else: | 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 | axarr.append(ax1) | 224 | axarr.append(ax1) |
| 219 | axarr.append(ax2) | 225 | axarr.append(ax2) |
| 220 | f.subplots_adjust(hspace=0) | 226 | f.subplots_adjust(hspace=0) |