Possible Duplicate:
How do I visualize a matrix with colors and values displayed?
I basically have a NxN (edit:N can be up to 80) matrix of double in MATLAB and I when to plot it as an array (I want to see the numbers) and some of the cells should be colored (the function to decide how I color my numbers is independent from the numbers).
I have thought of different ways to do that :
-
create an grid as an image and overlay it with the text but the plot of MATLAB is going to be horrible as it will remove some pixels to resize the image (my matrix can be around
80x80). -
Export to excel ? Don’t know how I would color the cells though.
Any help ?
As an image is sometimes more helpful :

Consider the following code:
As you increase the size of the matrix, the text will eventually overlap…
EDIT
Here is a way that works with larger matrices: we use an invisible figure, resize it to something big enough, and use a small font size (I used
2):Then at the end, export to file with a high resolution:
You can see the output file here (10025×5962 image, 645KB)