有什么办法可以使标题在matplotlib中居中? Python

时间:2020-02-26 21:31:01

标签: python

嘿,我正在尝试绘制一些树状图,但是由于某种原因,该图的主标题移到了右侧。 我有什么办法可以使它居中吗?

SingleCluster = linkage(matrix1_bnc,'single','cosine')
CompleteCluster = linkage(matrix1_bnc,'complete','cosine')
AverageCluster = linkage(matrix1_bnc,'average','cosine')

plt.figure(figsize=(32,26))
plt.suptitle("Dendrograms with BNC", fontsize="30")
plt.subplot(321)
plt.title("Single Link")
dendrogram(SingleCluster, labels=words1, orientation= 'right', leaf_font_size= "12");
plt.subplot(323)
plt.title("Complete Link")
dendrogram(CompleteCluster, labels=words1, orientation= 'right', leaf_font_size= "12");
plt.subplot(325)
plt.title("Average Link")
dendrogram(AverageCluster, labels=words1, orientation= 'right', leaf_font_size= "12");

Title

0 个答案:

没有答案