使用mpl_toolkits.mplot3d.Axes3D.plot_surface()
绘制曲面时,会出现似乎沿着正在绘制的曲面的曲线的线条。例如:
X, Y = numpy.meshgrid(numpy.arange(some_range), numpy.arange(some_other_range))
Z1, Z2 = numpy.array(getRate())
#getRate is a function that returns an array of shape (len(some_range), len(some_other_range)
fig = pyplot.figure()
ax = mplot3d.Axes3D(fig)
ax.plot_surface(X, Y, Z1, color='w', alpha=0.2)
ax.plot_surface(X, Y, Z2, color='b', alpha=0.2)
pyplot.show()
有没有什么方法可以去除这些烦人的东西,让表面更加光滑?我附上一张图片以说明我的意思。
getRate()
的问题,而不是matplotlib的问题。 - Chinmay Kanchi