Created
August 11, 2019 07:24
-
-
Save lawrencechen0921/b848dd9ba6b9b92e40c947dd6de57016 to your computer and use it in GitHub Desktop.
教大家如何用matplotlib第三方模組將數值轉換成圖片
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#首先你必須用 pip install matplotlib | |
#等他下載完成,你就可以使用模組去進行數據視覺化的動作 | |
import matplotlib.pyplot as plt | |
data=[5,10,15,25,20] #把你需要的data數值用出來 | |
plt.barh(range(len(data)),data) #圖片會顯示你data長度和範圍 | |
plt.show() | |
#是不是很簡單呀 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment