想做彩色图

问题描述

我正在尝试使用matplotlib绘制颜色映射图。首先,我定义我的形状和间隔值,基本上,形状是x和z中的样本数,间隔值是两个连续样本之间的距离。在这种情况下,我的X坐标将为shapex spacingx,而我的Y坐标将为shapex spacingy。我的颜色映射将是V的值,但是我不知道如何获取x和y信息,也不知道如何将它们绘制在一起。输出应该是这样的

enter image description here

添加与图像相同的标签也很重要。 ======================================================== =========================

shape = (101,101)  # Number of grid point (nx,nz)
spacing = (10.,10.)  # Grid spacing in m. The domain size is Now 1km by 1km
origin = (0.,0.)  # What is the location of the top left corner. This is necessary to define
# the absolute location of the source and receivers
# Define a veLocity profile. The veLocity is in km/s
v = np.empty(shape,dtype=np.float32)
v[:,:51] = 1.5
v[:,51:] = 2.5

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)