marsilea
marsilea copied to clipboard
add Labels legend or customised legend
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)
Many thanks, HM