标签: python matplotlib
我在pyplot上有两个箱图,我想要更改' 1'和' 2'两个叮叮&的后期索引'和' Pre Index'。怎么会这样做?
{{1}}
答案 0 :(得分:1)
您只需要设置当前轴的yticklabels(gca()获取当前轴)
yticklabels
gca()
plt.gca().set_yticklabels(['Post Index', 'Pre Index'])