<jupyter_start><jupyter_text>Plotting: changement de Eglob vs le changement de mean degree entre TP2 et TP3<jupyter_code>tp2_mean_degree_and_gEff_auc_df = mean_degree_and_gEff_auc_df[mean_degree_and_gEff_auc_df['timepoint']==1].reset_index()
tp3_mean_degree_and_gEff_auc_df = mean_degree_and_gEff_auc_df[mean_degree_and_gEff_auc_df['timepoint']==2].reset_index()

delta_tp2_vs_tp3_df = pd.DataFrame()
delta_tp2_vs_tp3_df["mean_degree_auc"] = tp3_mean_degree_and_gEff_auc_df["mean_degree_auc"] - tp2_mean_degree_and_gEff_auc_df["mean_degree_auc"]
delta_tp2_vs_tp3_df["glob_eff_auc"] = tp3_mean_degree_and_gEff_auc_df["glob_eff_auc"] - tp2_mean_degree_and_gEff_auc_df["glob_eff_auc"]
g = sns.jointplot(x="glob_eff_auc", y="mean_degree_auc", data=delta_tp2_vs_tp3_df,
                 kind="reg"
                 )

g.ax_joint.annotate('Spearman’s rho=0.785; p=0.001',
                    xy=(0.1, 0.9), xycoords='axes fraction',
                    ha='left', va='center')

g.ax_joint.set_xlabel('Change in Global Efficiency')
g.ax_joint.set_ylabel('Change in Mean Degree')
g.fig.savefig('delta_tp2vs3_geff_auc_mean_degree_correlation.svg', bbox_inches="tight", format='svg', dpi=1200)

pal = sns.color_palette('rocket', n_colors=3)
rgb_pal = [[value * 255 for value in color] for color in pal]
print(pal)
print(rgb_pal)
pal<jupyter_output>[(0.38092887, 0.12061482, 0.32506528), (0.7965014, 0.10506637, 0.31063031), (0.95922872, 0.53307513, 0.3748895)]
[[97.13686184999999, 30.7567791, 82.8916464], [203.107857, 26.791924350000002, 79.21072905000001], [244.6033236, 135.93415815, 95.5968225]]
{'fraction_non_alphanumeric': 0.1320754716981132, 'fraction_numerical': 0.14150943396226415, 'mean_word_length': 6.469483568075117, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '1', 'dir': 'jupyter-structured-clean-dedup', 'id': '508058', 'license': 'MIT', 'n_tokens_mistral': 820, 'n_tokens_neox': 689, 'n_words': 85, 'path': 'longitudinal_analysis/figures/globEff_mean_degree_correlation.ipynb', 'repo_name': 'JulianKlug/stroke-resilience', 'size': '1590'}