Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork7.9k
Open
Labels
Description
Bug summary
Surface is not rendered properly after changing the data usingset_verts
: the simple MWE below shows the effect.
Code for reproduction
importnumpyasnpimportmatplotlib.pyplotaspltimportmatplotlib.animationasanimationx=np.array([10,-10])y=np.array([25,-25])z=5X,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)fortintime: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 usingset_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