fig, ax1 = plt.subplots( figsize= (20,8)) ax2 = ax1.twinx() ax1.plot(df_cuba.wk_year, df_cuba.GP_per_sender, '-m') ax2.plot(df_row.wk_year, df_row.GP_per_sender, '-k') ax1.set_xlabel('X data') ax1.set_ylabel('Y1 data', color='m') ax2.set_ylabel('Y2 data', color='k') plt.show()
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter