Plotting repertoire overlap as a heatmap with scirpy

Hi ,
I’m struggling with scripy’s “” function. I would like to modify the heatmap label.size as my labels are quite long and its not obvious to me how best to do this . As currently the heatmap is being scrunched up.


Hi Devika,

the pl.repertoire_overlap function returns a ClusterGrid object as generated by the seaborn.clustermap function.

You can manipulate the ClusterGrid object. In this example I’m setting the xlabel size to a smaller value:

import matplotlib.pyplot as plt

g =
    heatmap_cats=["patient", "source"],
g.ax_heatmap.set_xticklabels(g.ax_heatmap.get_xticklabels(), fontsize=5)

Thank you very much. i was struggling with this for a while, as the styling arguments within the functions werent working

1 Like