Closed
Description
Bug report
Bug summary
The marker sizes that specified with s=
argument in scatter
function are wrong, and even worse, the markers are changing their sizes every time the plot is re-rendered (panning or resizing). It seems that the sizes are randomly reassigned to these markers.
Code for reproduction
import numpy as np
import matplotlib.pyplot as plt
from mpl_toolkits.mplot3d import Axes3D
fig = plt.figure()
# matplotlib 3.4
ax = Axes3D(fig, auto_add_to_figure=False)
fig.add_axes(ax)
# matplotlib 3.3.4
# Axes3D(fig)
x = np.random.rand(200)
y = np.random.rand(200)
z = np.random.rand(200)
ax.scatter(x, y, z, s=x*50)
plt.show()
Actual outcome
matplotlib_axes3d_marker_size_issue.mp4
Expected outcome
As shown in the screen recording, the sizes are correct and not changing. matplotlib
was 3.3.4 in the following example.
matplotlib_axes3d_marker_size_expected.mp4
Matplotlib version
- Operating system: Arch Linux
- Matplotlib version (
import matplotlib; print(matplotlib.__version__)
): 3.4.0 - Matplotlib backend (
print(matplotlib.get_backend())
): Qt5Agg - Python version: 3.9.2
- Jupyter version (if applicable): Not using it
- Other libraries: numpy 1.20.1
I installed both python, numpy and matplotlib with pacman
package manager from Arch's official repository.
Metadata
Metadata
Assignees
Labels
For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.For bugs that make the library unusable (segfaults, incorrect plots, etc) and major regressions.