Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- fig, axes = plt.subplots(nrows=2, ncols=2)
- ax0, ax1, ax2, ax3 = axes.flat
- ax0.hist(tweets["red"])
- ax0.set_title('Red in backgrounds')
- ax1.hist(tweets["red"][tweets["candidate"] == "trump"].values)
- ax1.set_title('Red in Trump tweeters')
- ax2.hist(tweets["blue"])
- ax2.set_title('Blue in backgrounds')
- ax3.hist(tweets["blue"][tweets["candidate"] == "trump"].values)
- ax3.set_title('Blue in Trump tweeters')
- plt.tight_layout()
- plt.show()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement