-
-
Notifications
You must be signed in to change notification settings - Fork 35
Description
How can I center align the xtickslabel? It is slightly offset to the left in the figure.
import PyComplexHeatmap as pch
import matplotlib.pylab as plt
from PyComplexHeatmap import *
plt.rcParams['font.sans-serif']='SimHei'
plt.figure(figsize=(8, 8))
row_ha = pch.HeatmapAnnotation(
Bar=pch.anno_barplot(df4,
height=40,cmap='rainbow',legend=False),
# selected=pch.anno_label(df_rows,colors='red',relpos=(-0.05,0.4)),
label_kws={'rotation':15,'horizontalalignment':'left','verticalalignment':'bottom'},
axis=0,verbose=0)
cm = pch.ClusterMapPlotter(data=df3,right_annotation=row_ha,
col_cluster=False,row_cluster=False,
col_split=2,row_split=2,
col_split_gap=1,row_split_gap=1,
label='values',
show_rownames=True,show_colnames=True,
row_names_side='left',col_names_side='bottom',
xticklabels_kws=dict(labelrotation=360,labelcolor='black',labelsize=14,bottom=True),
yticklabels_kws=dict(labelcolor='black',labelsize=14,left=True),
linewidths=0.01,linecolor='grey',
# legend_gap=20,
cmap='RdYlBu_r')
plt.show()
