As @Mr. T commented, you seem to be confusing the 1st and 2nd axes. If the second axis is a bar graph, then the rest of the time it is the first axis, isn’t it?
fig = plt.figure(figsize=(12,9))
ax1 = fig.add_subplot(111)
ax2 = ax1.twinx()
ax1.set_ylim(0, 3)
ax2.set_ylim(95, 130)
ax1.set_ylabel('$t_{score}$',font3)
ax2.set_ylabel('$node_iNum$',font3)
node = [110,118,121,107,123]
x = np.arange(5)
bar_wigth = 0.45
x_list= ['$node_1$','$node_2$','$node_3$','$node_4$','$node_5$']
ax2.bar(x,node,bar_wigth,color='green',label='$node_iNum$',alpha=0.6, tick_label=x_list)
ax2.set_xticklabels(x_list,font3)
t_score=[0.95,0.47,0.79,1.42,1.11]
quezhi=[1.94,1.94,1.94,1.94,1.94]
l=[i for i in range(5)]
ax1.plot(l, t_score,'r-', label='$t_{th}$')
ax1.plot(l, quezhi,'b--', label='$t_{score}$')
ax1.plot(l, t_score, 'ro', l, quezhi,'b^')
for a, b in zip(l, t_score):
ax1.text(a, b, b, ha='center', va='bottom', fontsize=10)
for a, b in zip(l, quezhi):
ax1.text(a, b, b, ha='center', va='bottom', fontsize=10)
fig.legend(bbox_to_anchor=(0, 1), bbox_transform=ax2.transAxes, loc='upper left', prop=font2)
fig.show()
CLICK HERE to find out more related problems solutions.