0
如何將圖表圍繞中心旋轉?這甚至有可能嗎?這是我的代碼。我可以使用動畫嗎?Python:旋轉關於中心的圖表
from mpl_toolkits.mplot3d import Axes3D
from matplotlib import cm
import pylab as p
import numpy as np
fig = p.figure()
ax = Axes3D(fig)
X = np.arange(-15, 15, 0.3)
Y = np.arange(-15, 15, 0.3)
X, Y = np.meshgrid(X, Y)
R = np.sqrt(X**2 + Y**2)
Z = np.sin(R)/R
ax.plot_surface(X, Y, Z, rstride=2, cstride=2,cmap=cm.jet)
p.show()
這裏是我的輸出: