我有以下代码块
fig, ax1 = plt.subplots(1,1)
my_norm = Normalize(vmin=0, vmax=component_stats.u_id.max())
ax1.bar(component_stats.index, component_stats["u_id"],color=cm(my_norm(component_stats["u_id"].array)),width=0.1)
ax2 = ax1.twinx()
ax2.plot(component_stats.index, component_stats["diff"],":",linewidth=3)
我有两个不重合的y轴
为什么会这样?我该如何解决?