image_output_1.png
import matplotlib.pyplot as plt

import numpy as np # linear algebra

import numpy as np # linear algebra

import seaborn as sns

fig = plt.figure(figsize=(20, 8))
col_x = 'CD53'
x_loc = df[col_x]
c = 0
for col in ['CD45RA', 'CD45RO', 'PTPRC']:
    if col in df_Y.columns:
        y_loc = df_Y[col]
    else:
        y_loc = df[col]
    c += 1
    fig.add_subplot(1, 3, c)
    sns.scatterplot(x=x_loc, y=y_loc)
    plt.xlabel(col_x)
    plt.ylabel(col)
    print(np.corrcoef(x_loc, y_loc)[0, 1], 'correlation ', col_x, col)
    m = (x_loc != 0) & (y_loc != 0)
    cc = np.corrcoef(x_loc[m], y_loc[m])[0, 1]
    print(cc, 'correlation excluding zeros ', col_x, col)
    if np.abs(cc) > 0.5:
        print('WOW it is big ! ')
plt.show()