In [1]: import seaborn as sns import numpy as np import matplotlib as mpl import matplotlib.pyplot as plt %matplotlib inline In [2]: def sinplot(flip=1): x=np.linspace(0,14,100)#0-14,取100条数据 for i in range(1,7): plt.plot(x,np.sin(x+i*.5)*(7-i)*flip)…
今天画一下3D图像,首先的另外引用一个包 from mpl_toolkits.mplot3d import Axes3D,接下来画一个球体,首先来看看球体的参数方程吧 (0≤θ≤2π,0≤φ≤π) 然后就可以上代码了: from matplotlib import pyplot as plt import numpy as np from mpl_toolkits.mplot3d import Axes3D a = np.linspace(0, np.pi*2, 20) b = np.linsp…