Home How to get Seaborn heat map to plot separately?
Reply: 0

How to get Seaborn heat map to plot separately?

Lux
1#
Lux Published in 2017-12-07 03:13:53Z

I am trying to get a Seaborn heat map on a separate graph based on the second plot, but it automatically just creates a heat map of the first plot. How can I get it to create a heat map for the second?

from pandas import DataFrame, read_csv
import matplotlib.pyplot as plt
import pandas as pd

file = r'C:\Users\...\data.xls'
df = pd.read_excel(file)

ptsList = df['PTS'].values.tolist()
print(ptsList)
plt.plot(ptsList)
plt.title('PTS of players')
plt.ylabel('3PA')
plt.xlabel('3PP')
plt.show()

fgList = df['FG'].values.tolist()
print(fgList)
plt.plot(fgList)
plt.title('FGs of players')
plt.ylabel('FGA')
plt.xlabel('3PM')
plt.show()

from sklearn.cluster import KMeans

from sklearn.decomposition import PCA

import seaborn as sns
corr = df.corr()
sns.heatmap(corr, 
            xticklabels=corr.columns.values,
            yticklabels=corr.columns.values)
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.301349 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO