python matplotlib 绘制热成像图
"""
绘制热成像图
"""
import numpy
as np
import matplotlib
.pyplot
as mp
num
= 1000
x
, y
= np
.meshgrid
(np
.linspace
(-3, 3, 1000),
np
.linspace
(-3, 3, 1000))
z
= (1 - x
/ 2 + x
** 5 + y
** 3) * np
.exp
(-x
** 2 - y
** 2)
mp
.figure
("imshow", figsize
=(8, 6), facecolor
="lightgray")
mp
.title
("imshow", fontsize
=18)
mp
.imshow
(z
, cmap
="jet", origin
="lower")
mp
.colorbar
()
mp
.show
()
转载请注明原文地址:https://ipadbbs.8miu.com/read-54291.html