用axvline()绘制垂直线

时间:2019-08-12 12:35:53

标签: python matplotlib

我一直在尝试在条形图上绘制一条垂直线,但是很难找到正确的X值,其中XPos = np.arange(13)Subplot1.set_xticks(XPos+1)。在这里,您可以看看我所拥有的。 预先非常感谢。

Subplot1.axhline(3, xmin=0, xmax=0.25, ls='-', lw=1 , color='navy')
Subplot1.axhline(6, xmin=0.25, xmax=0.75, ls='-', lw=1 , color='navy')
Subplot1.axhline(9, xmin=0.75, xmax=1, ls='-', lw=1 , color='navy')

Subplot1.axvline(???, ymin=3, ymax=6, ls='-', lw=1 , color='navy')
Subplot1.axvline(???, ymin=6, ymax=9, ls='-', lw=1 , color='navy')

enter image description here

0 个答案:

没有答案