How to draw matrix

Hi I am new to matplotlib and I am trying to use it to draw

    > a matrix. I would want to give a different color to each box
    > depending upon the value this matrix element has

    > Could someone help me in quick start meanwhile I am looking
    > into documentation.

figure()
imshow(rand(10,5), cmap=cm.jet, interpolation='nearest', aspect='auto')
colorbar()

figure()
pcolor(rand(10,5), cmap=cm.hot)

JDH