2018年1月22日 星期一

一張圖裡面有多張數據圖...

plt.subplot() 這個指令就是拿來畫多張圖用的指令

import matplotlib.pyplot as plt
import numpy as np

x1 = np.arange(0,360,1)
y1 = np.sin(x1 * np.pi / 180.0)

x2 = x1
y2 = np.cos(x2 * np.pi / 180.0)

x3 = x1
y3 = np.tan(x3 * np.pi / 180.0)

plt.subplot(211)
plt.plot(x1,y1,lw=1)

plt.subplot(212)
plt.plot(x3,y3,"y--",lw=3)

plt.ylabel("y_label")
plt.xlabel("x_label")
plt.title("Title")

plt.xlim(-30,390)
plt.ylim(-5,5)

plt.show()



沒有留言:

張貼留言

Node-Red --> MQTT --> Fuxa

Node-Red --> MQTT --> Fuxa      FUXA(一個開源的 Web HMI / SCADA 自動化監控軟體)的專案設定檔 。 這份設定檔完整定義了 HMI 監控畫面的 後端通訊(MQTT 連線、點位標籤) 與 前端網頁圖形介面(SVG 畫布...