text_html_output_1.png
import matplotlib.pyplot as plt

import numpy as np # linear algebra

import pandas as pd # data processing, CSV file I/O (e.g. pd.read_csv)

import matplotlib.pyplot as plt
df = pd.read_csv('/kaggle/input/pima-indians-diabetes-database/diabetes.csv')

data = df.iloc[:, 0:8]

plt.tight_layout()

colnames = data.columns.values

plt.tight_layout()

plt.tight_layout()

names = ['preg', 'plas', 'pres', 'skin', 'test', 'mass', 'pedi', 'age', 'class']
correlations = data.corr()
fig = plt.figure(figsize=(16, 12))
ax = fig.add_subplot(111)
cax = ax.matshow(correlations, vmin=-1, vmax=1)
fig.colorbar(cax)
ticks = np.arange(0, 9, 1)
ax.set_xticks(ticks)
ax.set_yticks(ticks)
ax.set_xticklabels(names)
ax.set_yticklabels(names)
plt.show()