Closed mbernste closed 3 months ago
Hi @mbernste ,
Thanks for your question. Actually, for this example, it's very simple, just change the code from
CD=anno_simple(df.CD,add_text=True,colors={'C':'tomato','D':'yellowgreen','G':'skyblue'},
legend_kws={'frameon':False}),
to
CD=anno_simple(df.CD,add_text=True,colors={'G':'skyblue','D':'yellowgreen','C':'tomato'},
legend_kws={'frameon':False}),
If colors
is not given and one would like to use cmap
to indicate colors. Then you can change the order of df.CD
and the order of the labels in the legend would be changed too.
Hi,
Thank you so much for this great package! Is it possible to re-order labels within a legend created by
anno_simple
?For example, in this quick example, how would one re-order the labels in the "CD" annotation from being "C", "D", "G" to, say, "G", "D", "C" in the legend?
Thank you so much!
Best, Matt