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

Home » Public Forums » archive » 'tvim' and 'contour' problem.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
'tvim' and 'contour' problem. [message #8031] Fri, 31 January 1997 00:00
D.Kennedy is currently offline  D.Kennedy
Messages: 26
Registered: January 1997
Junior Member
I have a 2D array that looks like this:
IDL> help, map
MAP FLOAT = Array(27, 21)

I used 'tvim' (great library routine) to display this nice image.
As the picture, the 2-D array 'map' is actually a triangulated
surface made from real data points the scale doesn't match when
plotted. The picture goes from 0->27, 0->21, the 'real' scale
from the data points goes from 64->67, -28->-26.

I did this to fix it (brilliant routine TVIM!):
tvim, map, xrange=[l_min, l_max], yrange=[b_min, b_max]

but this means that then a following call to 'contour' will not work
as the scales are now mismatched, I think contour tries to draw
contours at x/y = 0 -> 30 when in fact the 'image' is at x/y = 60-ish.
(Based on no xrange/yrange arguement to TVIM, then the contours are fine.)

I just naively used 'contour, map, /overplot, clevels=clevels' where clevels
is from 'tvim'.

I then tried a method based on an example at the top of 'tvim', namely this:

map_max = max(map) & map_min = min(map) & delim = immx-immn
xrange=[l_min, l_max]
yrange=[b_min, b_max]
range=[map_max,map_min]
x_size = n_elements(map(*,0))
y_size = n_elements(map(0,*))
xx= findrng(xrange, y_size)
yy= findrng(yrange, x_size)

tvim, map, /scale, $
range = range, clevels=clevels, $
xrange = xrange, yrange=yrange
contour, map, xx, yy, levels=clevels,/overplot

But this gives me an error too -
% CONTOUR: X, Y, or Z array dimensions are incompatible

I've tried a few quick and dirty attempts to fix this ('axis' etc)
but didn't achieve a result. Anyone see where I'm going wrong?
I'm assuming that TVIM is widely used in conjunction with CONTOUR
and so someone must have a ready answer! ;-)

Thanks for any help. (E-mail replies too please)
--
David Kennedy, Dept. of Pure & Applied Physics, Queen's University of Belfast
Email: D.Kennedy@Queens-Belfast.ac.uk | URL: http://star.pst.qub.ac.uk/~dcjk/
Hi! I'm a .signature virus! Copy me into yours and join the fun!
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Radar/Telemetry Processing
Next Topic: New Internet Software Report 2/1/97

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

Current Time: Wed Oct 08 13:39:18 PDT 2025

Total time taken to generate the page: 0.00493 seconds