Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Closed
Labels
Milestone
Description
Bug report
Bug summary
The marker sizes that specified withs=
argument inscatter
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
importnumpyasnpimportmatplotlib.pyplotaspltfrommpl_toolkits.mplot3dimportAxes3Dfig=plt.figure()# matplotlib 3.4ax=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 withpacman
package manager from Arch's official repository.