Using !P.Multi for TVSCL,CONGRID [message #41552] |
Thu, 18 November 2004 01:05  |
Ertel, KG (Klaus)
Messages: 3 Registered: November 2004
|
Junior Member |
|
|
Hello!
My solution would be to create a plot (using PLOT or CONTOUR) and then
place the colormap into it. I think this is also explained somewhere in
the IDL manuals. This way you also have axes around your plot. Example:
CONTOUR, data, x, y, XSTYLE = 1, YSTYLE = 1, /NODATA
PX = !X.WINDOW * !D.X_VSIZE
PY = !Y.WINDOW * !D.Y_VSIZE
SX = PX[1] - PX[0] + 1
SY = PY[1] - PY[0] + 1
if !D.NAME eq 'PS' then begin
tvscl, data, px[0], py[0], xsize = sx ,ysize = sy
endif else begin
tvscl, congrid(data,SX,SY),PX[0],PY[0]
endelse
Note the difference between PS output where you have scalable pixels and
other devices where you scale the number of pixels. Besides, I wouldn't
use !P.Multi but the POSITION keyword to place your plots (with /NOERASE
for the second and subsequent plots on the page). This gives you much
better control over the positioning of the plots. Hope this helps...
Klaus
-----Original Message-----
From: roberson_1@yahoo.com (Roy) [mailto:roberson_1@yahoo.com]
Posted At: 10 November 2004 01:42
Posted To: comp.lang.idl-pvwave
Conversation: Using !P.Multi for TVSCL,CONGRID
Subject: Using !P.Multi for TVSCL,CONGRID
Is there a way to use !P.Multi plot using
TVSCL,CONGRID(data,400,400)?
I know !P.Multi works for other plot commands but I'm not able to use
congrid on !P.Multi.
Thanks,
Lee
|
|
|
Re: Using !P.Multi for TVSCL,CONGRID [message #41672 is a reply to message #41552] |
Wed, 10 November 2004 07:06   |
Liam Gumley
Messages: 473 Registered: November 1994
|
Senior Member |
|
|
Marshall Perrin wrote:
> Roy <roberson_1@yahoo.com> wrote:
>
>> Is there a way to use !P.Multi plot using
>> TVSCL,CONGRID(data,400,400)?
>> I know !P.Multi works for other plot commands but I'm not able to use
>> congrid on !P.Multi.
>
>
> The solution is to use a more intelligent plotting routine than just
> TVSCL. I like Liam Gumley's IMDISP, but other routines such as
> David Fanning's TVIMAGE or Fen Tamanaha's DISPLAY also work.
>
> - Marshall
I'll second that. You can find IMDISP at
http://www.gumley.com/PIP/Free_Software.html
Here's how to use it:
p.multi = [0, 2, 2, 0, 0]
imdisp, dist(8)
imdisp, dist(32)
imdisp, dist(64)
imdisp, dist(256)
Note that IMDISP automatically byte-scales the image, just like TVSCL.
Cheers,
Liam.
Practical IDL Programming
http://www.gumley.com/
|
|
|
|
Re: Using !P.Multi for TVSCL,CONGRID [message #41739 is a reply to message #41552] |
Thu, 18 November 2004 10:50  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Lee writes:
> Is there a way to use !P.Multi plot using
> TVSCL,CONGRID(data,400,400)?
> I know !P.Multi works for other plot commands but I'm not able to use
> congrid on !P.Multi.
No, get one of the smart TV commands: TVImage, ImgDist, PlotImage, etc.
Cheers,
David
--
David W. Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http:/www.dfanning.com/
Phone: 970-221-0438, IDL Book Orders: 1-888-461-0155
|
|
|