01
—
准备工作
python环境: jupyter notebook。....numpy用于创建数组,且内置计算函数很强
02
—
定义色温
mycolormap = plt.get_cmap('plasma')
具体colorbar的色度表见:
https://matplotlib.org...height = 0.1, 0.1, 0.05, 0.8
#获得绘制的句柄
ax1 = fig.add_axes([left, bottom, width, height])
# Set the colormap...与绘制voxel图保持一致
norm = mpl.colors.Normalize(vmin=xyzminvalue, vmax=xyzmaxvalue)
#色温colorbar的数值范围可选择实际xyz...edgecolor=None, with 'hsv' colormap
总结:
本帖详细具体地介绍了python代码实现三维色温图绘制, 大家可以此为基础掌握python语言的基本绘图使用.