heatmap / Matplot

Joshua Auerbach joshua.auerbach at uvm.edu
Fri Jun 6 23:05:13 CEST 2008


Hi,

I am looking for some assistance.  I am trying to make what I know as a 
heatmap.  Basically I have data for many points on a grid and want to 
construct a 2d plot where each point is given a color on a gradient 
(From blue to red say) based on the data value at that point.  I have 
the data in the form of a matrix with 3 columns x-coord, y-coord, data value

Currently I am making this type of plot by transforming my grid 
coordinates into matrix coordinates of a new matrix and scaling my data 
values into the range [0, NUM_COLORS] and using the Matplot function to 
plot this data.  This method does work, but has a few shortcomings: I 
lose the original scale of my grid since the axis labels are based on 
the matrix coordinates.  There is no key explaining the gradient and 
even if there were I would lose the original scale of my data values.

Does anyone know how to get around these limitations or know of a better 
way to accomplish what I am trying to do?  I'd appreciate any help.

Cheers,
Josh



More information about the users mailing list