# 선그래프 그리기
#
import matplotlib.pyplot as plt
a=[1,2,3,4,5]
plt.plot(a)
plt.show()
y = [2 * x + 1 for x in range(10)]
plt.plot(y)
plt.show()
#
# 막대그리프 그리기
#
import numpy as np
label = ['seoul', 'pusan', 'daegu', 'incheon', 'kwangju', 'daejeon', 'ulsan']
ndata = np.array([5087, 1639, 1180, 1350, 664, 726, 544])
plt.bar(range(ndata.size), ndata)
plt.xticks(range(ndata.size), label)
plt.show()
https://wikidocs.net/4767
http://bcho.tistory.com/m/1201
http://freeprog.tistory.com/15
댓글 없음:
댓글 쓰기