코딩 때 간단하게 복붙하기 위해 적어놓는 용도이자 복습용이다. Ctrl + F를 통해서 찾아서 복붙하려고 한다.
Matplotlib 라이브러리 호출 import matplotlib.pyplot as plt 그래프 생성 Example x = [1, 2, 3] y = [4, 5, 6] plt.figure() plt.plot(x, y) 실행 결과 : * lineplot은 y 값만 있어도 그림을 그릴 수 있는데 x값은 자동으로 0, 1, 2로 정해진다. 그래프 설정하기 선 두께 조절 plt.plot(x, y, linewidth = 10) 선 color 조정 plt.plot(x, y, color = 'red') 선 형태 변경 plt.plot(x, y, linestyle = ':') # 1 plt.plot(x, y, 'o') # 2 plt.plot(x, y, 'ro') # 3 실행 결과: 데이터 위치 표시 (marker 이용) plt.plot(x, y, marker = 'o') marker 크...
#
matplotlib
#
python
#
subplot
#
subplots
#
twinx