import matplotlib.pyplot as plt
import pandas as pd
data = pd.read_excel('lane.xlsx',sheet_name="lane")
data3 = pd.read_excel('lane3.xlsx',sheet_name="lane3")
data4 = pd.read_excel('lane4.xlsx',sheet_name="lane_4")
# plt.plot(data.a,data.left,c='red',label ='left lane')
# plt.plot(data.a,data.right,c='blue', label ='right lane')
# plt.plot(data.a,data.car,c='green', label ='car')
# data3['left'].plot( c='red', label ='left lane')
# data3['right'].plot(c='blue', label ='right lane')
# plt.plot(data3.a,data3.car,c='green', label ='car')
data4['left'].plot( c='red', label ='left lane')
data4['right'].plot(c='blue', label ='right lane')
data4['car'].plot(c='green', label ='car')
plt.xlabel('data',size=25)
plt.xticks(fontsize=20)
plt.yticks(fontsize=20)
plt.ylabel('cm',size= 25)
plt.legend(fontsize=15)
plt.grid()
plt.show()
레전드(legend, 범례)의 작성법, 위치설정, 다중레전드 - matplotlib(11)
파이썬 버전 3.7 기준 matplotlib 버전 3.0.3 기준 plot의 레전드(legend)의 작성법 본 포스팅에서는 레전드의 작성법과, 위치설정, 그리고 다중 레전드의 작성법을 다룬다. 레전드와 관련된 간한 용
kongdols-room.tistory.com
라벨링 사용법
반응형
'코딩 > 파이썬(python)' 카테고리의 다른 글
from collections import Counter , .most_common() (0) | 2021.05.02 |
---|---|
enumerate 인덱스와 수를 같이 저장하자 (0) | 2021.04.15 |
from itertools import combinations (0) | 2021.04.07 |
람다(lambda) (0) | 2021.04.06 |
탐색에 사용되는 자료구조 큐, 스택, 재귀함수 (0) | 2021.03.31 |