1. label

plt.plot(x, np.sin(x))                            
plt.title('A Sine Curve')                            # 표 전체에 대한 제목label을 붙여보았습니다
plt.xlabel('x')                                     # x 축에 대한 label
plt.ylabel('sin(x)')                                # y 축에 대한 label

2. 선에 대한 각주 표시

plt.plot(x,np.sin(x), '-g', label='sin(x)')       
       
plt.plot(x, np.cos(x), ':b', label = 'cos(x)')       # sin, cos 그래프에 달아놓은 라벨은 당장에 보이지 않지만 아래 legend 명령으로 각주만들 때 쓰임

plt.axis('equal')                                       # 표 x,y축의 비율 균일하게
                             
plt.legend()                                           # 위에서 지정한 선에 대한 라벨을 토대로 각주 만든다

plt.xlabel('x')                                          # x축에 대한 라벨
plt.ylabel('y')                                          # y축에 대한 라벨 
plt.title('Sin and Cos')                              # 표 전체에 대한 라벨

+ Recent posts