Commit ac906987 authored by VIGNET Pierre's avatar VIGNET Pierre
Browse files

[cmd] aesthetics for clustermap

parent 94ac06ae
......@@ -209,6 +209,7 @@ def draw_matrix_heatmap(df, filepath):
# => Without this, one label on two is printed due to too big fontsize...
## TODO: Find a way to dynamically set the fontsize of xticks
sns.set(font_scale=0.6, rc={"xtick.labelsize": 8 if df.shape[1] < 90 else 5})
sns.set_style("ticks")
# Pour colorer les problèmes entre eux (histoire de voir qu'ils sont bien
# regroupés lors de la phase de clustering)
......@@ -223,10 +224,11 @@ def draw_matrix_heatmap(df, filepath):
# => utilisation direct du dataframe
df,
# The value at which to center the colormap when plotting divergent data
center=0,
# center=0,
# The mapping from data values to color space. If not provided,
# the default will depend on whether center is set. vlag, Blues, coolwarm
cmap='coolwarm',
# sns.color_palette("PuBu", 10)
cmap="Blues",
xticklabels=True,
yticklabels=False,
# standard_scale=1,
......@@ -238,6 +240,11 @@ def draw_matrix_heatmap(df, filepath):
# Customization
# Top figure title
clustergrid.fig.suptitle("ClusterMap of <" + filepath + ">", fontsize=15)
# Mask row dendrogram
clustergrid.ax_row_dendrogram.set_visible(False)
# Mask colorbar
clustergrid.cax.set_visible(False)
# Axes
clustergrid.ax_heatmap.set_ylabel("Solutions", fontsize=12)
clustergrid.ax_heatmap.set_xlabel("Boundaries", fontsize=12)
clustergrid.ax_heatmap.set_xticklabels(
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment