Skip to content

Commit

Permalink
update explore_pathomics_trend
Browse files Browse the repository at this point in the history
  • Loading branch information
PingjunChen committed Jul 19, 2023
1 parent c24bc38 commit ee3fb0f
Showing 1 changed file with 9 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,18 @@ def set_args():
"AEC-Contrast", "AEC-Energy", "LYM-Contrast", "LYM-Energy"]
stage_list = ["Normal", "AAH", "AIS", "MIA", "ADC"]
for path_fea in pathomics_lst:
fig, axes = plt.subplots(1, 3, figsize=(18, 5))
fig, axes = plt.subplots(1, 4, figsize=(20, 5))
sns.violinplot(data=fuse_fea_df, x = "Stages", y=path_fea, order=stage_list, orient='v', ax=axes[0])
axes[0].spines[['right', 'top']].set_visible(False)
sns.violinplot(data=fuse_fea_df, x = "Stages", y=path_fea, hue = "Dataset", order=stage_list, orient='v', ax=axes[1])
sns.violinplot(data=fuse_fea_df, x = "Stages", y=path_fea, hue = "Race", order=stage_list, orient='v', ax=axes[2])
sns.violinplot(data=fuse_fea_df, x = "Stages", y=path_fea, hue = "SmokeStatus", order=stage_list, orient='v', ax=axes[3])
# plt.legend(loc = "best")
fig.suptitle("{} Trends Across Cohorts and Races".format(path_fea))
fig.suptitle("{} Trends Comparison on All Data, Three Cohorts, Two Races, and Smoking Status Across Stages".format(path_fea))
for ind in range(1, 4):
axes[ind].spines[['left', 'right', 'top']].set_visible(False)
axes[ind].get_yaxis().set_visible(False)
axes[ind].legend(frameon=False)
plt.tight_layout()
trend_plot_path = os.path.join(path_trend_dir, "{}-Trends{}".format(path_fea, args.plot_format))
plt.savefig(trend_plot_path, transparent=False, dpi=300)

0 comments on commit ee3fb0f

Please sign in to comment.