lov*_*eed 4 python plot matplotlib
我有一张看起来像这样的桌子
我将突出显示的部分作为我想要做的矩阵imshow
.我希望绘制对数的x刻度,通过查看最上面一行中的参数值可以理解.怎么做是matplotlib?
Pau*_*l H 10
你想要使用pcolor
,而不是imshow
.这是一个例子:
import numpy as np
import matplotlib.pyplot as plt
fig, ax = plt.subplots()
Z = np.random.random(size=(7,7))
x = 10.0 ** np.arange(-2, 5)
y = 10.0 ** np.arange(-4, 3)
ax.set_yscale('log')
ax.set_xscale('log')
ax.pcolor(x, y, Z)
Run Code Online (Sandbox Code Playgroud)
哪个给我: