fig = plt.figure(figsize = (20,8)) # Create matplotlib figure ax = fig.add_subplot(111) # Create matplotlib axes ax2 = ax.twinx() # Create another axes that shares the same x-axis as ax. width = 0.4 df_cuba.GP_per_sender.plot(kind='bar', color='m', ax=ax, width=width, position=1) df_row.GP_per_sender.plot(kind='bar', color='blue', ax=ax2, width=width, position=0) ax.set_ylabel('cuba', color='m') ax2.set_ylabel('row', color='b') 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