擅长:python、mysql、java
<p>对于与此<a href="http://i.stack.imgur.com/mPgvy.png" rel="nofollow">example</a>类似的行附近的文本,请使用:</p>
<pre><code>vline_value = 3
fig, ax = plt.subplots(figsize=(10,10))
ax.axvline(x=vline_value, ymin=0, ymax=1)
x_bounds = ax.get_xlim()
ax.annotate(s='vline_value', xy =(((vline_value-x_bounds[0])/(x_bounds[1]-x_bounds[0])),1.01), xycoords='axes fraction', verticalalignment='right', horizontalalignment='right bottom' , rotation = 270)
fig.savefig('example')
</code></pre>
<p>此外,如果需要,此短脚本还包含更多选项:
<a href="https://pythonhosted.org/lineid_plot/#" rel="nofollow">https://pythonhosted.org/lineid_plot/#</a></p>