I have a matrix P of m rows and n columns. P(i,j) contains the price of occupying position i at time j. I want to plot this in Matlab but in a way to get some kind of density plot with different price levels corresponding to different colors. An example of the output would be something like this:
A filled 2-d contour plot seems to be what you are looking for.
Assuming you have vectors (or matrices) "position" and "time", the following snippet should work (modulo an apostrophe or two)
What about just using surface plot? Something like:
or for more options something like:
surf(P,'EdgeColor','none','facecolor','interp'); view(0,90); colormap('hot')