[Python]matplotlib
matplotlib는 간단한 막대 그래프, 선그래프, 산포도를 그리는 용도import matplotlib.pyplot as plt#우리나라의 연간 1인당 국민소득을 각각 years, gdp에 저장years = [1960,1950, 1980, 1990, 2000, 2010, 2011]gdp = [67,80,257,1686,6505,11865,22105]#선 그래프를 그린다. x축 = yearsplt.plot(years, gdp, color = 'green', marker='o', linestyle ='solid')#제목 설정 plt.title("GDP per capita")#y축에 레이블을 붙인다. plt.ylabel("dollar")plt.savefig("gdp_per_capita.png", dpi = ..
2024.05.16