In [1]:
import numpy as np
from adashof import cm2in
import matplotlib.pyplot as plt
from matplotlib import rcParams, patheffects

# Load xkcd and change some parameters
plt.xkcd()
rcParams['path.sketch'] = (.5, 25, 1)
rcParams['path.effects'] = [patheffects.withStroke(linewidth=0, foreground="none")]

# Adjust dpi, so figure on screen and savefig looks the same
rcParams['figure.dpi'] = 300
rcParams['savefig.dpi'] = 300

fig = plt.figure(figsize=(cm2in([.3,.3])))
ax = plt.gca()
ax.axis('equal')
ax.set_axis_off()
ax.set_xticks([])
ax.set_yticks([])

t1 = np.linspace(0, np.pi/2, 20)
t2 = np.linspace(0, np.pi/2, 12)
x = np.cos(t1)
y = np.sin(t1)

a = 1.1
b = .9
c = .7
d = .5

#color = '#000099'
color = '#CE1126'

plt.fill(np.r_[a*x, b*x[-1::-1], a*x[0]], np.r_[a*y, b*y[-1::-1], a*y[0]], ec=color, fc='none', hatch='/////', lw=.5)
plt.fill(np.r_[c*x, d*x[-1::-1], c*x[0]], np.r_[c*y, d*y[-1::-1], c*y[0]], ec=color, fc='none', hatch='//////', lw=.5)

cc = plt.Circle([0.13,0.13], .12, ec=color, fc='none', hatch='//////', lw=.5)
ax.add_patch(cc)

ax.set_xlim([-.1, 1.15])
ax.set_ylim([-.1, 1.15])

#plt.savefig('plots/rss.png', bbox_inches='tight', pad_inches=0.02, transparent=True)
plt.show()