赞
踩
import numpy as np
# evenly sampled time at 200ms intervals
t = np.arange(0., 5., 0.2)
# red dashes, blue squares and green triangles
plt.plot(t, t, 'r--', t, t**2, 'bs', t, t**3, 'g^')
plt.show()
plt.plot(t, t, ‘r–’, t, t2, ‘bs’, t, t3, ‘g^’)
plt.plot(t, t, ‘r–’, t, t2, ‘bs’, t, t3, ‘g^’)
可以看出,每三个参数一组,我们也可以分开写成
plt.plot(t, t, 'r--')
plt.plot( t, t**2, 'bs')
plt.plot( t, t**3, 'g^')
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。