I have 474 x 3 matrix (attached). Column 1 of the matrix is time, column 2 is the number of times something occurred, and column 3 is a column of dummy variables that identifies what type of event happened.
Here is a truncated example of the matrix:
361.488 0 1001
361.491 0 2001
362.021 0 3001
363.017 3 4001
366.231 0 1001
366.235 0 2001
366.885 0 3001
367.883 2 4001
So, for example, row 1 shows that event 1001 occurred 0 times at time point 361.488. Row 4 shows that event 4001 occurred 3 times at time point 363.017...and so on.
What I would like to do is create a heat map where the categorical dummy variable is on the y-axis, time is on the x-axis, and the categorical variables that occurred at the different time points on the x-axis are colored 'cool' to 'hot' based on the numer of times the event occurred (the number in the second column).
For example, one could imagine that as you read from left to right from the 1001 point on the y-axis that there are a series of cool and warm colors indicating that a fewer or greater number of 1001 events occurred as a function of time.
I have tried doing this using heatmap, pcolor, and imagesc functions and can't get it to do quite what I want.
Any help is much appreciated!