#!/usr/bin/env python # coding: utf-8 # # Imports # In[51]: import pandas as pd import numpy as np import seaborn as sb import matplotlib as mpl from IPython.display import display, HTML import matplotlib.pyplot as plt # In[52]: HTML('''
''') # # Loading data # In[72]: path = '../../../Desktop/IndiaEuroopeFstMatrix.csv' data = pd.read_csv(path, index_col=0) # # Describing data # In[73]: data.describe() # In[74]: data.head() # # Normalizing # In[75]: data-=data.min().min() data.min().min() data/=data.max().max() data.describe() # # Plotting # In[76]: data_lt = data.where(np.tril(np.ones(data.shape)).astype(np.bool)) mpl.rcParams['figure.figsize'] = 20,15 ax = sb.heatmap(data_lt, cmap="Spectral", square=True, linewidths=.5) bottom, top = ax.get_ylim() ax.set_ylim(bottom + 0.5, top - 0.5) #sb.set(font_scale=1.55) ax.hlines([range(47)], *ax.get_xlim()) ax.vlines([range(47)], *ax.get_xlim()) ax.set_yticklabels(ax.get_yticklabels(), rotation=0) ax.set_xticklabels(ax.get_xticklabels(), rotation=90) plt.show() # In[ ]: