File Exchange Pick of the Week

August 28th, 2007

Heat maps in MATLAB

Here at The MathWorks we are always concerned with useful ways of displaying data. A heat map is a graphical representation of data where the values taken by a variable in a two-dimensional map are represented as colors. This is something that is natural for an image, and indeed we have had that in IMTOOL for quite sometime now.

imtool.jpg

This week’s pick shows how to make a heat map in MATLAB for your own data. This heat map will scale nicely so that the text is always the right size. As a bonus, this code also used created a published m-file to make a nice html document showing how to use the code.

4 Responses to “Heat maps in MATLAB”

  1. Markus replied on :

    Yesterday I read your blog, today I needed exactly the function heatmaptext. Great!

  2. Doug replied on :

    I have found that the more data visualizations I know, the more likely I am to “need” them. Glad this new trick helped.

    Doug

  3. JerBen replied on :

    Hi Doug,

    Love the blog and videos. It really helps to see someone else using matlab.

    If you are looking for some great insight into ways to visualize data: check out Tutfe: http://www.edwardtufte.com His books and seminar are excellent.

    JerBen

  4. Doug replied on :

    JerBen,

    We are very familiar with Tufte here at the MathWorks, many of us go to his excellent one day seminar when he come to Boston on tour. His three major books are on my bookshelf right in front of me.

    Doug

Leave a Reply

Wrap code fragments inside <pre> tags, like this:

<pre class="code">
a = magic(3);
sum(a)
</pre>

If you have a "<" character in your code, either follow it with a space or replace it with "&lt;" (including the semicolon).


MathWorks

Brett & Jiro share their favorite user-contributed submissions from the File Exchange.

These postings are the author's and don't necessarily represent the opinions of The MathWorks.