#배열 선언
t1 = np.arange(0,1.0,1/30)
t = np.linspace(0,1,31)
#y = np.cos(t)
y=np.cos(t)
#사이즈조절
plt.figure(figsize=(8,3))
#그래프 옵션
plt.plot(t,y, marker='s',ls='dashed',color=(0,0.3,0.6),markersize=4,markerfacecolor='g',markeredgecolor='y')
#저장
plt.savefig('img.png')
#출력
plt.show()
[결과]
댓글 달기