#pylab 是扩展库matplotlib的一个模
import numpy as np
import pylab as pl
import matplotlib.font_manager as fm
myfont = fm.FontProperties(fname=r'C: \Windows\Fonts\STKAITI.ttf')
t = np.arange(8.8, 2.0xnp.pi, 0.01)
s=np.sin(t)
z=np.cos(t)
pl.plot(t,s, label='正弦')
pl.plot(t,z, label='余弦')
pl.xlabel('x-变量',fontproperties='STKAITI', fontsize=24)
pl.ylabel('y-正弦余弦函数值',fontproperties='STKAITI', fontsize=24)pl.title('sin-cos 函数图像',fontproperties='STKAITI', fontsize=32)pl.legend(prop=myfont)
pl.show()
#pylab 是扩展库matplotlib的一个模
import numpy as np
import pylab as pl
import matplotlib.font_manager as fm
myfont = fm.FontProperties(fname=r'C: \Windows\Fonts\STKAITI.ttf')
t = np.arange(8.8, 2.0xnp.pi, 0.01)
s=np.sin(t)
z=np.cos(t)
pl.plot(t,s, label='正弦')
pl.plot(t,z, label='余弦')
pl.xlabel('x-变量',fontproperties='STKAITI', fontsize=24)
pl.ylabel('y-正弦余弦函数值',fontproperties='STKAITI', fontsize=24)pl.title('sin-cos 函数图像',fontproperties='STKAITI', fontsize=32)pl.legend(prop=myfont)
pl.show()
import pylab as pl
a = pl.arange(e, 2.0*pl.pi, 0.1)
b =pl.cos(a)
pl.scatter(a,b)
pl.show()
#在 pylab巷