8000 axis('equal') in mplot3d plots causes duplicate z axis in the nbagg backend · Issue #4971 · matplotlib/matplotlib · GitHub
[go: up one dir, main page]

Skip to content
axis('equal') in mplot3d plots causes duplicate z axis in the nbagg backend  #4971
Closed
@jenshnielsen

Description

@jenshnielsen

This is on current master I can't reproduce this using 1.4.3. I guess it relates to the stale auto redraw handling?

from mpl_toolkits.mplot3d import Axes3D


fig = plt.figure(figsize=(6.5,5.5))
ax = fig.add_subplot(1, 1, 1, projection='3d')
xs = np.random.rand(10)
ys = np.random.rand(10)
zs = np.random.rand(10)
ax.set_aspect('equal')

ax.scatter(xs, ys, zs)
ax.set_xlim(0,1)
ax.set_ylim(0,1)
ax.set_zlim(0,1)
fig.tight_layout()

results in

download 2

Rotating the figure restores the correct axes. I can't reproduce it with QT5Agg or GTK3Agg

It seems like both the equal axis z and the original z axis are drawn on top of each other. It doesn't seem to happen in regular 2D plots.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions

    0