我想将我的数据绘制为具有以下结构的热图:
[ERROR] COMPILATION ERROR :
[INFO] -------------------------------------------------------------
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryinsurance/esignature/integration/dao/uiintegration/IUiIntegrationDao.java:[7,63] package com.mercuryinsurance.esignature.integration.interceptor does not exist
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryinsurance/esignature/integration/dao/uiintegration/IUiIntegrationDao.java:[33,59] cannot find symbol
symbol: class ESignatureIntegrationConfig
location: interface com.mercuryinsurance.esignature.integration.dao.uiintegration.IUiIntegrationDao
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryinsurance/esignature/integration/manager/uiintegration/IUiIntegrationManager.java:[12,63] package com.mercuryinsurance.esignature.integration.interceptor does not exist
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryinsurance/esignature/integration/manager/uiintegration/IUiIntegrationManager.java:[44,61] cannot find symbol
symbol: class ESignatureIntegrationConfig
location: interface com.mercuryinsurance.esignature.integration.manager.uiintegration.IUiIntegrationManager
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryinsurance/esignature/integration/manager/uiintegration/UiIntegrationManager.java:[41,63] package com.mercuryinsurance.esignature.integration.interceptor does not exist
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryinsurance/esignature/integration/manager/uiintegration/UiIntegrationManager.java:[220,68] cannot find symbol
symbol: class ESignatureIntegrationConfig
location: class com.mercuryinsurance.esignature.integration.manager.uiintegration.UiIntegrationManager
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryin surance/esignature/integration/dao/uiintegration/UiIntegrationDao.java:[15,63] package com.mercuryinsurance.esignature.integration.interceptor does not exist
[ERROR] /C:/ClearCase/ssadat_ESign1_Dev01/MercGlobal/ESign1/ESignature/src/com/mercuryin surance/esignature/integration/dao/uiintegration/UiIntegrationDao.java:[86,72] cannot find symbol
symbol: class ESignatureIntegrationConfig
location: class com.mercuryinsurance.esignature.integration.dao.uiintegration.UiIntegrationDao
x和y轴应用X和Y表示,而'heat'用Z值表示。
E.g。在坐标(x,y)=(1,2)处,强度应为0.33 如何通过使用matplotlib实现这一目标? 查看与关键字热图相关的帖子,甚至是与术语轮廓图相关的帖子,我还不能将它转移到这个问题。
提前感谢您提供任何提示 丹
答案 0 :(得分:5)
我希望你的数据只是一个例子,因为它看起来很有趣(它更像是一系列条带; x维度是不变的。)
我建议使用pandas (general data-analysis)和seaborn (matplotlib-extensions),这会让它更好一些。
import pandas as pd
import matplotlib.pyplot as plt
import seaborn as sns
X = [1,1,1,1,1,1,1,1,1,1]
Y = [1,2,3,4,5,6,7,8,9,10]
Z = [0.2, 0.33, 0.1, 0.25, 0.0, 0.9, 0.75, 0.88, 0.44, 0.95]
data = pd.DataFrame({'X': X, 'Y': Y, 'Z': Z})
data_pivoted = data.pivot("X", "Y", "Z")
ax = sns.heatmap(data_pivoted)
plt.show()