728x90
밀도에 따라 색상을 달리하여 시각화한 차트이다.
import matplotlib.pyplot as plt
import seaborn as sns
import pandas as pd
import numpy as np
if __name__ == '__main__':
df = pd.DataFrame(np.random.random((5,5)), columns=['a', 'b', 'c', 'd', 'e'])
print(df)
sns.heatmap(df)
plt.show()
결과 값
a b c d e
0 0.087655 0.427545 0.743457 0.864916 0.374516
1 0.235498 0.689074 0.487793 0.522156 0.678673
2 0.084710 0.313334 0.605814 0.955031 0.398501
3 0.684323 0.674611 0.129794 0.618308 0.375868
4 0.389495 0.069244 0.735744 0.866972 0.658019
728x90
'Data Science > Data Visualization' 카테고리의 다른 글
[05. Etcetera Chart] 010. Data Map (0) | 2021.10.06 |
---|---|
[05. Etcetera Chart] 008. Gantt Chart (0) | 2021.10.06 |
[05. Etcetera Chart] 007. Word Cloud Chart (0) | 2021.10.06 |
[05. Etcetera Chart] 006. Funnel Plot (0) | 2021.10.06 |
[05. Etcetera Chart] 005. Rader Chart (0) | 2021.09.06 |