Skip to content

Commit

Permalink
Merge pull request #26 from lshpaner/flex_corr_labels
Browse files Browse the repository at this point in the history
  • Loading branch information
Oscar-Gil-Data authored Aug 10, 2024
2 parents 7c841e6 + 1791a84 commit 3cfe069
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/eda_toolkit/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -2203,8 +2203,8 @@ def flex_corr_matrix(
image_path_svg=None,
figsize=(10, 10),
title="Cervical Cancer Data: Correlation Matrix",
title_fontsize=16,
label_fontsize=10,
label_fontsize=12,
tick_fontsize=10,
xlabel_rot=45,
ylabel_rot=0,
xlabel_alignment="right",
Expand Down Expand Up @@ -2352,28 +2352,28 @@ def flex_corr_matrix(

# Set the font size for the colorbar label
cbar = heatmap.collections[0].colorbar
cbar.ax.tick_params(labelsize=label_fontsize)
cbar.ax.tick_params(labelsize=tick_fontsize) # Updated to use tick_fontsize
cbar.set_label(cbar_label, fontsize=label_fontsize)

# Set the title if provided
if title:
plt.title(
"\n".join(textwrap.wrap(title, width=text_wrap)),
fontsize=title_fontsize,
fontsize=label_fontsize, # Now using label_fontsize instead
)

# Rotate x-axis labels, adjust alignment, and apply padding
plt.xticks(
rotation=xlabel_rot,
fontsize=label_fontsize,
fontsize=tick_fontsize, # Updated to use tick_fontsize
ha=xlabel_alignment,
rotation_mode="anchor",
)

# Rotate y-axis labels and adjust alignment
plt.yticks(
rotation=ylabel_rot,
fontsize=label_fontsize,
fontsize=tick_fontsize, # Updated to use tick_fontsize
va=ylabel_alignment,
)

Expand Down

0 comments on commit 3cfe069

Please sign in to comment.