Skip to content

Axes order changed in 3.4.0rc1 #19598

@ericpre

Description

@ericpre

Bug report

Bug summary

The order of the axes is changed in matplotlib 3.4.0rc1.

Code for reproduction

import matplotlib
import matplotlib.pyplot as plt
import numpy as np

image = np.arange(10*10).reshape((10, 10))

fig = plt.figure()
ax = fig.add_subplot()
im = ax.imshow(image)
fig.colorbar(im)

print("Matplotlib version", matplotlib.__version__)
print("Axes:", fig.axes)

Actual outcome

Matplotlib version 3.4.0rc1
axes: [<AxesSubplot:label='<colorbar>'>, <AxesSubplot:>]

Expected outcome

Matplotlib version 3.4.0rc1
axes: [<AxesSubplot:>, <AxesSubplot:label='<colorbar>'>]

Matplotlib version

  • Operating system: Fedora
  • Matplotlib version (import matplotlib; print(matplotlib.__version__)): 3.4.0rc1
  • Matplotlib backend (print(matplotlib.get_backend())): module://ipykernel.pylab.backend_inline
  • Python version: 3.8.6 or 3.9.2
  • Jupyter version (if applicable):
  • Other libraries:

Matplotlib 3.4.0rc1 installed from pypi

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions