fig1.suptitle('Test')ax1 = fig1.add_subplot(221)ax1.plot(x,y1,color='b',label='aVal')ax2 = ax1.twinx()ax2.plot(x,y2,color='g',label='bVal')ax2.grid( ls='--', color='black')h1, l1 = ax1.get_legend_handles_labels()h2, l2 = ax2.get_legend_handles_labels()ax1.legend(h1+h2, l1+l2, loc=2)
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)