#!/usr/bin/env python # coding: utf-8 # In[1]: from pylab import * get_ipython().run_line_magic('matplotlib', 'inline') xkcd() # In[2]: f, axes = subplots(2, 1, figsize=[6, 6]) axes = axes.flatten() labels = ['Opinion', 'News I do not\ncare about', 'News I care about', 'Headlines'] frac1 = [0.33, 0.01, 0.33, 0.33] frac2 = [0.05, 0.89, 0.05, 0.01] axes[0].pie(frac1, labels=labels); axes[0].set_title('Relative importance in judging media') axes[1].pie(frac2, labels=labels); axes[1].set_title('Relative amount of content') f.tight_layout()