Closed
Description
Bug report
Bug summary
Subplots are sometimes using bad axis limits depending on the number and layout of subplots.
I guess those axis limits are guess from what gets plotted.
This happens in 3.2.1 but not in 3.1.2. I looked through the changelogs of 3.2 releases and saw nothing about axis limits. Sorry if I missed it.
Code for reproduction
Here I plot a point at x=0, y=0:
import matplotlib.pyplot as plt
for rows in range(1, 3):
for cols in range(1, 3):
# skip single plot, no subplot there
if rows == 1 and cols == 1: continue
fig, axes = plt.subplots(rows, cols)
for i, ax in enumerate(axes.ravel()):
ax.scatter(x=0, y=0)
plt.show()
Matplotlib version
-
Operating system: Archlinux
-
Matplotlib version: 3.2.1 from Arch repos
-
Matplotlib backend (
print(matplotlib.get_backend())
): Qt5Agg, module://ipykernel.pylab.backend_inline -
Python version: 3.8.2 from Arch repos
-
Matplotlib 3.1.2 from pip