contourf with squares not interpolated contours?

  • Follow


Hi all,

I would like to plot a matrix as a bunch of colors representing the z values, but I want the plot to give a well defined square, rather than the contours that are the reason countourf has its name. 

Example here: http://hansgilde.files.wordpress.com/2009/10/stock_heat.png

Can anyone give me a hint on how to do this matlab, preferably with a standard function?

Tx!
0
Reply forkandwait 3/4/2010 11:17:21 PM

"forkandwait w" <forkandwait@gmail.com> wrote in message <hmpf21$mk0$1@fred.mathworks.com>...
> Hi all,
> 
> I would like to plot a matrix as a bunch of colors representing the z values, but I want the plot to give a well defined square, rather than the contours that are the reason countourf has its name. 
> 
> Example here: http://hansgilde.files.wordpress.com/2009/10/stock_heat.png
> 
> Can anyone give me a hint on how to do this matlab, preferably with a standard function?
> 
> Tx!

help:

surf
pcolor
imagesc

should get you started.
-Andrew
0
Reply Andrew 3/4/2010 11:43:22 PM


> pcolor

This looks like it will work, once I figure out how to rejigger the axis labels and such.

Thanks!
W
0
Reply forkandwait 3/5/2010 12:16:06 AM

2 Replies
623 Views

(page loaded in 0.042 seconds)

Similiar Articles:









7/25/2012 7:16:16 PM


Reply: