要在同一图形上绘制多个图形,您必须执行以下 *** 作:
from numpy import *import mathimport matplotlib.pyplot as pltt = linspace(0, 2*math.pi, 400)a = sin(t)b = cos(t)c = a + bplt.plot(t, a, 'r') # plotting t, a separately plt.plot(t, b, 'b') # plotting t, b separately plt.plot(t, c, 'g') # plotting t, c separately plt.show()
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)