Python draws a thermal diagram

繪製採集溫度的溫度熱力場。參考博客:https://blog.csdn.net/liyazhou0215/article/details/72491993/

  • Draw the thermal field of temperature for the collection temperature.

code:

import matplotlib.pyplot as plt
import matplotlib.cm as cm
from matplotlib.colors import LogNorm
import numpy as np
x, y = np.random.rand(10), np.random.rand(10)
z = (np.random.rand(9000000)+np.linspace(0,1, 9000000)).reshape(3000, 3000)
plt.imshow(z+10, extent=(np.amin(x), np.amax(x), np.amin(y), np.amax(y)),
        cmap=cm.hot, norm=LogNorm())
plt.colorbar()
plt.show()

接下來,通過輸入數據繪製二維溫度場。

  • Next, a two-dimensional temperature field is plotted from the input data.

 

  I hope I can help you,If you have any questions, please  comment on this blog or send me a private message. I will reply in my free time. 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章