import numpy as np
from matplotlib import pyplot as plt
x=np.arange(0,np.pi*2,0.1)
y=np.cos(x)
plt.xlabel('x')
plt.ylabel('y')
plt.title('sin')
plt.plot(x,y)
plt.grid()
plt.savefig('D:\cos.png')
plt.show()