Career/AI Associate

AICE Associate 요약 #5 - matplotlib 핵심 문법 정리

by somida 2026. 8. 7.
반응형

 

alias

# matplotlib 별칭
import matplotlib.pyplot as plt
import matplotlib.font_manager as fm

matplotlib

import matplotlib.pyplot as plt

 

1.figure

도화지 생성

plt.figure()

 

2. plot

선 그래프

# label1이라는 범례이름으로 데이터를 표시하라
plt.plot(history_data['col'], label='label1')

 

3. title

제목

plt.title("Title")

 

4. xlabel, ylabel

x축, y축

plt.xlabel("xlabel")

 

5. show

그래프 그리기

plt.show()

 

6. legend

범례정보 표시

plt.legend()

 

 

반응형

댓글