comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: matrix plot similar to pcolor() in matlab?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: matrix plot similar to pcolor() in matlab? [message #40771 is a reply to message #40747] Thu, 26 August 2004 10:00 Go to previous message
David Fanning is currently offline  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/
[Message index]
 
Read Message
Read Message
Previous Topic: Re: rate in xinteranimate
Next Topic: Beyond 7-bit ASCII

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 11:01:34 PDT 2025

Total time taken to generate the page: 0.48362 seconds