Re: matrix plot similar to pcolor() in matlab? [message #40771 is a reply to message #40747] |
Thu, 26 August 2004 10:00  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Josef Koller writes:
> does anyone know how to plot a simple 2D matrix similar to the pcolor()
> command in matlab?
No, I don't.
> Thanks for your help in advance. I've spend already hours on this but
> nothing comes close.
Hours, huh. Just reading about what pcolor() does,
I should think this would come reasonably close:
matrix = RandomU(-3L, 10, 10)
pos = [0.15,0.15, 0.9, 0.9]
LoadCT, 5
TVImage, BytScl(Congrid(matrix, 400, 400)), Position=pos
Plot, [0,10], [0,10], Position=pos, /NoErase, /NoData
You might have to download TVIMAGE:
http://www.dfanning.com/programs/tvimage.pro
If I wanted to *interpolate* the colors from the
neighbors, then I might have to think about the
problem for more than a couple of minutes. I'd
probably try something with an IDLgrSurface
and a texture map. :-)
http://www.dfanning.com/ographics_tips/imgtex.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|