# create some data
x = np.linspace(-np.pi,np.pi,100)
y = np.cos(2.5*x)
fig = plt.figure()
ax = fig.add_subplot(111)
ax.plot(x,y, mfc='orange', mec='orange', marker='.')
# using 'spines', new in Matplotlib 1.0
ax.spines['left'].set_position('zero')
ax.spines['right'].set_color('none')
ax.spines['bottom'].set_position('zero')
ax.spines['top'].set_color('none')
ax.spines['left'].set_smart_bounds(True)
ax.spines['bottom'].set_smart_bounds(True)
ax.xaxis.set_ticks_position('bottom')
ax.yaxis.set_ticks_position('left')
ax.axhline(linewidth=2, color='blue')
ax.axvline(linewidth=2, color='blue')
show()
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…