It depends on what you need to do with the graph, when you have one, Matplotlib allows you to interactively display the graph on the screen, save it as a vector, PDF or bitmap, etc.
If you choose this framework, imshow will do everything you need, here is an example:
# Just some data to test: from random import gauss a = [[gauss(0, 10) for i in xrange(0, 5)] for j in xrange(0,5)] from pylab import *
For more information on colormap check this link , and here for imshow - or just use help(colors.LinearSegmentedColormap) and help(imshow) .
alt text http://img522.imageshack.us/img522/6230/bluep.png
(note that this is the result with standard options, you can add a grid, change the filtering, etc.).
Edit
however i'm looking to display numbers in a grid
To make it simple:
for i in xrange(0,5): for j in xrange(0,5): text(i, j, "{0:5.2f}".format(a[i][j]), horizontalalignment="center", verticalalignment="center")
source share