python heatmap
-
[Python] seaborn을 이용한 간단한 heatmap 그리기Python/Python For Analytics 2020. 11. 28. 22:17
import seaborn as sns import pandas as pd import matplotlib.pyplot as plt # 7 X 7 2차원 배열과 X축 , y축 value = [[10,20,30,30,40], [10,20,30,30,40], [10,20,30,30,40], [10,20,30,30,40], [10,20,30,30,40]] x = ['X1', 'X2', 'X3', 'X4', 'X5'] y = ['Y1', 'Y2', 'Y3', 'Y4', 'Y5'] # create Dataframe df = pd.DataFrame(value,columns=x, index=y) # heatmap fig, ax = plt.subplots(figsize=(15,10)) # figsize ax = sns..