Skip to content

imshow in v3.1.1: y-axis chopped-off  #15255

@prisae

Description

@prisae

Bug report

Bug summary

imshow behaviour change between matplotlib 3.1.0 and 3.1.1; y-axis is chopped-off in 3.1.1.

Code for reproduction

Run this in matplotlib 3.1.0 and 3.1.1.

import numpy as np
import matplotlib.pyplot as plt
xy = ["1", "2"]
fig, ax = plt.subplots()
im = ax.imshow(np.array([[0.8, 0.0], [0.1, 6.3]]))
ax.set_xticks(np.arange(len(xy)))
ax.set_yticks(np.arange(len(xy)))
ax.set_xticklabels(xy)
ax.set_yticklabels(xy)
plt.show()

This is a simplified version from the first figure on

where the difference can also be observed.

Actual outcome

3-1-1

Expected outcome

3-1-0

Matplotlib version

  • Operating system: Linux
  • Matplotlib version: v3.1.0 vs v3.1.1
  • Matplotlib backend: Qt5Agg
  • Python version: 3.7

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions