I want to plot something like the second following image in python using matplotlib:
The code behind this is here:
#!/usr/bin/env python
from pylab import *
Z = rand(6,10)
subplot(2,1,1)
c = pcolor(Z)
title('default: no edges')
subplot(2,1,2)
c = pcolor(Z, edgecolors='k', linewidths=4)
title('thick edges')
show()
Now, I have a list of booleans and I just want to draw a grey rectangle for each True
value and a red one for each False
value.
Say I just have this:
a = array([True,False],[False,False])
What value in [0,1] should I assign to True and to False?