skbio.stats.distance.DissimilarityMatrix.plot¶
- DissimilarityMatrix.plot(cmap=None, title='')[源代码]¶
- 创建相异矩阵的热图 - 状态:从0.4.0开始实验。 - 参数:
- cmap (str or matplotlib.colors.Colormap, optional) -- 设置热图的配色方案,如果 - None,默认为matplotlib RC文件中指定的颜色映射。
- title (str, optional) -- 设置热图的标题标签(默认为空) 
 
- 返回:
- 该图包含绘制的相异度矩阵的热图和颜色条。 
- 返回类型:
 - 示例 - 使用标记为A-E的五个对象定义相异度矩阵: - >>> from skbio.stats.distance import DissimilarityMatrix >>> dm = DissimilarityMatrix([[0, 1, 2, 3, 4], [1, 0, 1, 2, 3], ... [2, 1, 0, 1, 2], [3, 2, 1, 0, 1], ... [4, 3, 2, 1, 0]], ... ['A', 'B', 'C', 'D', 'E']) - 将相异矩阵绘制为热图: - >>> fig = dm.plot(cmap='Reds', title='Example heatmap') - ( - Source code,- png)  
