matplotlib 라이브러리를 통해 라인 차트를 만들수 있다.
x, y축 라벨을 정의하고 list를 차트화 시킬 수 있다.
import numpy as np
import matplotlib.pyplot as plt
x = [2,3,4,5,7,9,13,15,17]
plt.plot(x)
plt.ylabel('Sunlight')
plt.xlabel('Time')
plt.show()
dots를 포함하는 차트를 그리려면,
plt.plot(x, 'ro-')
'프로그래밍 > Python' 카테고리의 다른 글
Python Tutorial : Date and Time [14] (0) | 2016.04.16 |
---|---|
Python Tutorial : Modules [13] (0) | 2016.04.16 |
Python Tutorial : Statistics [11] (0) | 2016.04.15 |
Python Tutorial : Read and Write File [10] (0) | 2016.04.15 |
Python Tutorial : Dictionary [9] (0) | 2016.04.15 |