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).


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

  • Jon: This is a useful tool - but in fairness I have to point out that it is remarkably similar to a routine of the...
  • oleg: The author has implemented skewness, kurtosis and checks answering appropriately to the critic.
  • Ashok: how to store 10 or more random number in a loop a loop for i = 1:n mean(i) = input(’enter the mean value...
  • Ben: Doug, Thanks for the very helpful videos! Uitables seem like a convenient way to make a customized property...
  • oleg: Allstats has no checks, no comments and could also be improved (talking about prctile implementatio). Not to...
  • Todd: Additional information and a link to download free MATLAB and Simulink LEGO MINDSTORMS NXT code can be found at...
  • Doug: @Leo, Here is the “English version” of that code. “vec = []” makes an empty variable...
  • leo: Dear Doug I have a question in your code ‘October 9th, 2009 at 13:53′ vec = []; vec = [vec val]; I...
  • Shanker Keshavdas: You sir, are a gentleman and a scholar… No really, helped me out a lot. As to what is...
  • Quan Zheng: how can I get a copy of stepspecs.m?

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