DingWB / PyComplexHeatmap

PyComplexHeatmap: A Python package to plot complex heatmap (clustermap)
https://dingwb.github.io/PyComplexHeatmap/
MIT License
257 stars 28 forks source link

barplot not correct(anno 0-0.05, should 0-0.5 like legend) #6

Closed welyt closed 1 year ago

welyt commented 1 year ago

heatmap 的柱状图的范围不正确,应该是0~0.5, 而且理论上图例不应该显示0~0.5 颜色变化

image image

DingWB commented 1 year ago

Thanks for you to report the bug. For the legend of ctDNA_percent, you can turn off the legend by setting legend=False inanno_barplot. Could you please give me an example dataset for the wrong range of the y-axis in the barplot so I can reproduce your result?

BTW, your legend is a little bit wide, and you can change the width of legend by legengd_width parameter.

DingWB commented 1 year ago

Please see this example. You can also use cmap to set different colors for the bars according to the data values. In this case, the legend for anno_barplot would be helpful.

welyt commented 1 year ago

thank you for your reply, today I rerun the code(jupyter) , the bar range correct! if set the legend_witdh=5, the legend sample_type not show complete. so I set legend_width=10. any suggest?

image sample_info_value_df.txt sample_heatmap_value_df.txt

DingWB commented 1 year ago

OK, thanks for your feedback. You can either increase the legend_width or replace 'mix_health' with a shorted name or abbreviation.