# -*- coding: utf-8 -*-
"""
Created on Wed Sep 14 17:07:19 2016

@author: o27708936
"""

from matplotlib import pyplot as plt
from matplotlib.patches import Rectangle
import matplotlib.cm as cm
import numpy as np



plt.ion()
plt.figure()
currentAxis = plt.gca()
colors = cm.inferno(np.linspace(0.2, 1, 10))
currentAxis.add_patch(Rectangle((-0.2,-0.2), 0.2, 0.2))
for j in range(20):
    for i in range(40):
        if((not(j%2) and (i%4 == 2)) or (j%2 and not(i%4))):
            currentAxis.add_patch(Rectangle((i/10.,j/10.), 0.1, 0.1,alpha=1,color=colors[i//4]))
currentAxis.autoscale_view()
plt.axis('equal')
#plt.show()
