当前位置:   article > 正文

python interpolate 4d_python脚本纠错:interpolate.interp2d的正确用法

interpolate.interp2d

说明:

所以在插值前,加两句把输入参数变成一维数组

XX = np.arange(0, 16, 1)

YY= np.arange(0, 12, 1)

29755a34cc16746c003dc06f9ef068ad.png

代码:

from matplotlib import pyplot as plt

import numpy as np

from mpl_toolkits.mplot3d import Axes3D

from scipy import interpolate

import matplotlib as mpl

import matplotlib.cm as cm

fig = plt.figure()

Z=np.empty([12,16])

#ax = Axes3D(fig)

ax = fig.add_subplot(121, projection='3d')

bx = fig.add_subplot(122, projection='3d')

adc=[

29.38, 29.28, 29.23, 29.35, 29.53, 29.49, 29.41, 29.34, 29.42, 29.46, 29.58, 29.55, 29.49, 29.35, 29.46, 30.07,

29.43, 29.36, 29.39, 29.34, 29.55, 29.54, 29.44, 2

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/在线问答5/article/detail/803834
推荐阅读
相关标签
  

闽ICP备14008679号