-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Closed as not planned
Closed as not planned
Copy link
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: mplot3d
Description
Bug summary
Surface is not rendered properly after changing the data using set_verts: the simple MWE below shows the effect.
Code for reproduction
import numpy as np
import matplotlib.pyplot as plt
import matplotlib.animation as animation
x = np.array([10, -10])
y = np.array([25, -25])
z = 5
X, Y = np.meshgrid(x, y)
Z = z * np.ones_like(X)
fig = plt.figure(figsize=(8, 4.5))
ax = fig.add_subplot(projection="3d")
ax.axes.set_xlim3d(left=-15, right=15)
ax.axes.set_ylim3d(bottom=-30, top=30)
ax.axes.set_zlim3d(bottom=0, top=10)
surf = ax.plot_surface(X, Y, Z, color="r", alpha=0.3)
plt.pause(1.0)
time = np.linspace(0, 5, 101)
for t in time:
zt = z + 2 * np.sin(2 * np.pi * t)
Z = zt * np.ones_like(X)
verts = np.array([X, Y, Z]).T.reshape(4, 3)
surf.set_verts(verts)
plt.pause(0.1)Actual outcome
Expected outcome
The full surface, as is shown prior to updating using set_verts should be shown:
Operating system
Ubuntu 21.04
Matplotlib Version
3.4.2
Matplotlib Backend
Qt5Agg
Python version
3.8.11
Jupyter version
No response
Other libraries
No response
Installation
conda
Conda channel
No response
Metadata
Metadata
Assignees
Labels
status: closed as inactiveIssues closed by the "Stale" Github Action. Please comment on any you think should still be open.Issues closed by the "Stale" Github Action. Please comment on any you think should still be open.status: inactiveMarked by the “Stale” Github ActionMarked by the “Stale” Github Actiontopic: mplot3d

