Skip to content

quickplot.contourf features not attached to supplied axes #2946

Closed
@rcomer

Description

@rcomer

When iris.quickplot adds labels, colorbar, etc. to a contourf plot it doesn't necessarily add them to the supplied axes instance. Example:

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()

Output figure 1:
figure_1

Output figure 2:
figure_2

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions