Plotting commands like PLOT and CONTOUR or imaging commands like TV automatically initialize a window, if none exists. If one exists, however, those commands just keep overwriting that window. The command for opening a graphics window that you can control more thoroughly is WINDOW. WINDOW takes an optional argument 'Window_Index' which allows the programmer to open additional windows beyond the first. To open 5 windows you might use an approach like this:
windowIndexes = lonarr(5) ; Window indexes are long integers under the covers
for i = 0, 4 do WINDOW, windowIndexes[i], XSIZE=myWinWidth, YSIZE=myWinHeight
Now, to pick a specific window for a particular graphics output, you use the IDL command WSET. Let's say, for example, you want to change the image shown on the second window that you initialized above. Here is the code:
wset, windowIndexes[1]
TV, myNewImage
James Jones
|