-
Couldn't load subscription status.
- Fork 297
Closed
Labels
Description
🐛 Bug Report
Following on from #2946, when the axes labels were fixed. I just noticed that quickplot.contourf still attaches the colorbar to the current axes, even if a different axes is supplied.
How To Reproduce
import matplotlib.pyplot as plt
import iris
import iris.quickplot as qplt
fig1 = plt.figure()
fig2 = plt.figure()
fname = iris.sample_data_path('hybrid_height.nc')
theta = iris.load_cube(fname, 'air_potential_temperature')
cross_section = next(theta.slices(['grid_longitude',
'model_level_number']))
ax = fig1.add_subplot(2, 1, 1)
qplt.contourf(cross_section, axes=ax)
plt.show()Expected behaviour
Colorbar should be attached to the axes containing the contour plot.
Environment
- OS & Version: RHEL 7.9
- Iris Version: 3.1.dev0

