Python 注释x轴上点之间的底圈(括号)

Python 注释x轴上点之间的底圈(括号),python,matplotlib,annotate,Python,Matplotlib,Annotate,我怎样才能画出这个图并注释,或者直接添加一个在每个单词之间添加一些文本的底栏,然后我假设通过稍微向下移动x标签使其易读 要创建的示例: 起始代码: 注释的坐标由轴设置,位置由手动设置 ax.annotate('s', xy=(0.275, -0.15), xytext=(0.275, -0.35), fontsize=14, ha='center', va='bottom', xycoords='axes fraction', bbox=dic

我怎样才能画出这个图并注释,或者直接添加一个在每个单词之间添加一些文本的底栏,然后我假设通过稍微向下移动x标签使其易读

要创建的示例:

起始代码:


注释的坐标由轴设置,位置由手动设置

ax.annotate('s', xy=(0.275, -0.15), xytext=(0.275, -0.35),
            fontsize=14, ha='center', va='bottom', xycoords='axes fraction', 
            bbox=dict(boxstyle='square', fc='0.8'),
            arrowprops=dict(arrowstyle='-[, widthB=5.0, lengthB=.5', lw=2.0))

ax.annotate('t-s', xy=(0.725, -0.15), xytext=(0.725, -0.35),
            fontsize=14, ha='center', va='bottom', xycoords='axes fraction', 
            bbox=dict(boxstyle='square', fc='0.8'),
            arrowprops=dict(arrowstyle='-[, widthB=5.0, lengthB=.5', lw=2.0))

ax.annotate('s', xy=(0.275, -0.15), xytext=(0.275, -0.35),
            fontsize=14, ha='center', va='bottom', xycoords='axes fraction', 
            bbox=dict(boxstyle='square', fc='0.8'),
            arrowprops=dict(arrowstyle='-[, widthB=5.0, lengthB=.5', lw=2.0))

ax.annotate('t-s', xy=(0.725, -0.15), xytext=(0.725, -0.35),
            fontsize=14, ha='center', va='bottom', xycoords='axes fraction', 
            bbox=dict(boxstyle='square', fc='0.8'),
            arrowprops=dict(arrowstyle='-[, widthB=5.0, lengthB=.5', lw=2.0))