Open stephanmg opened 1 month ago
Hi @stephanmg ,
Take a look at: https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/advanced_usage.html#Cluster-between-groups-and-cluster-within-groups
I guess col_split_order
is what you are looking for.
Yes, I forgot that I need to also specify col_cluster=False
, col_dendrogram=False
is not enough.
@DingWB thank you! Is it also possible to remove or reposition the label of a anno_barplot(...)?
Code:
AB=anno_barplot(...
.
I need to move the label AB
or remove it in the plot.
Remove label with label_kws
: 'visible': False
. Can I also move the label more away from the plot?
Also, how can i provide a label to anno_barplot which contains spaces, in the examples in the docs there are never spaces I think, is this perhaps not supported? I need to write AB variant=anno_barplot(...)
in essence.
How did you control the pad in a normal barplot?
You can control the pad similarly by taking the ax of the anno_barplot
and doing whatever you want.
Thanks, what about the label name? Can I somehow include spaces?
Please try.
No, sorry, I mean in the labels name. This is a second question, on how to rename the label, e.g. AB for the annotation to
AB variant`
See this docu: https://dingwb.github.io/PyComplexHeatmap/build/html/notebooks/advanced_usage.html#Add-multiple-heatmap-annotations-using-for-loop
You could prepare a dict and pass it to HeatmapAnnotation. You can give whatever key to the dict (including space).
legend_kws
with label
I assume? doesn't work somehow for my anno_barplot. :/
row_ha = HeatmapAnnotation(ABadvanced=anno_barplot(histo_data_for_row_ha, colors=bar_color, height=15), verbose=0, label_kws={'label': "# problems solved", 'rotation':0, 'fontsize': 8, 'horizontalignment':'left','verticalalignment':'bottom', 'visible':False}, axis=1)
But this will not rename Abadvanced to "# problems solved"... don't know why. Could you help out again? Thanks!
Hi,
I have a col_split by a
pd.Series
to group into 3 different groups A, B, and C.The groups A, B, C seem to be automatically sorted ascending.
However I need to sort with a custom order within the groups A, B, C. How is this possible?