Closed
Description
Bug summary
The Axes3D does not work as expected.
Code for reproduction
import matplotlib.pyplot as plt
import numpy as np
from mpl_toolkits.mplot3d import Axes3D
plt.style.use('_mpl-gallery')
# Make data
np.random.seed(19680801)
n = 100
rng = np.random.default_rng()
xs = rng.uniform(23, 32, n)
ys = rng.uniform(0, 100, n)
zs = rng.uniform(-50, -25, n)
# Plot
# fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
fig = plt.figure()
ax = Axes3D(fig)
ax.scatter(xs, ys, zs)
ax.set(xticklabels=[],
yticklabels=[],
zticklabels=[])
plt.show()
Actual outcome
The outcome figure is blank.
Expected outcome
Should show figure with correct content.
Additional information
The code works well if changed to
fig, ax = plt.subplots(subplot_kw={"projection": "3d"})
Operating system
Windows
Matplotlib Version
3.6.2
Matplotlib Backend
Qt5Agg
Python version
3.9.15
Jupyter version
NA
Installation
conda