| 235 | @image_comparison(['contour_colorbar.png'], remove_text=True, style='_classic_test', |
| 236 | tol=0 if platform.machine() == 'x86_64' else 0.054) |
| 237 | def test_contour_colorbar(): |
| 238 | fig, ax = plt.subplots(figsize=(4, 2)) |
| 239 | data = np.arange(1200).reshape(30, 40) - 500 |
| 240 | levels = np.array([0, 200, 400, 600, 800, 1000, 1200]) - 500 |
| 241 | |
| 242 | CS = ax.contour(data, levels=levels, extend='both') |
| 243 | fig.colorbar(CS, orientation='horizontal', extend='both') |
| 244 | fig.colorbar(CS, orientation='vertical') |
| 245 | |
| 246 | |
| 247 | @image_comparison(['cbar_with_subplots_adjust.png'], remove_text=True, |