# level, time and conc are previously read from a file
X,Y=[level,time]
Z=conc.transpose() # Create the data to be plotted
cax = matshow(Z, origin='lower', vmin=0, vmax=500)
# I am telling all the Z values above 500 will have the same color
# in the plot (if vmin or vmax are not given, they are taken from
# the input’s minimum and maximum value respectively)
grid(True)
cbar = colorbar(cax)
您应该使用matshow或imshow绘图功能。在
这里的一个重要论点是插值。 检查这个example from the matplotlib gallery以查看一些示例。在
通过使用matshow(),关键字参数被传递到imshow()。 matshow()设置原点,插值(=“最近的”)和方面的默认值。在
这是我自己的一个例子。。。在
…返回此图:
相关问题 更多 >
编程相关推荐