marsilea icon indicating copy to clipboard operation
marsilea copied to clipboard

add Labels legend or customised legend

Open hmassalha opened this issue 9 months ago • 4 comments

Thanks for the amazing tool! I have a list of gene labels. I added red color for genes sharing a pathway, and left black the genes that are not part of the pathway. My question is: how I can add a legend for the red labelled text? Something like this:

label_cols = ['r' if l in df2plot[df2plot['pathway']=='RR'].index else 'k' for l in df_heatmap.index ]
gene_names = mp.Labels(df_heatmap.index, fontsize=8, text_props={'color': label_cols})
h.add_right(gene_names)

image

Many thanks, HM

hmassalha avatar May 10 '24 10:05 hmassalha