;+ ; ; @file_comments ; Make a real zoom in a plot, contrarly at the function ; ZOOM prewritten by IDL which just get pixels bigger. ; ; @categories ; utilities ; ; @restrictions ; use the journal. ; ; @history ; Sebastien Masson (smasson\@lodyc.jussieu.fr) ; 29/4/1999 ; ; @version ; $Id$ ; ; @todo ; seb ; ;- ; cursor, x1, y1, /data, /dowm cursor, x2, y2, /data, /down x = [x1, x2] x = x[sort(x)] y = [y1, y2] y = y[sort(y)] domdef, [x, y, vert1, vert2] ; we must close the journal! journal ; we recuperate the journal as a vector of string: vectjournal = getfile(myuniquetmpdir+'idlsave.pro') ; we cut the last line which is vraizoom vectjournal = vectjournal[0:n_elements(vectjournal)-2 ] ;------------------------------------------------------------ ; we correct it if there is the need to... ;------------------------------------------------------------ for i = 0, n_elements(vectjournal)-1 do $ if strpos(vectjournal[i],'text_box' ) EQ -1 then $ vectjournal[i] = strtrim(strcompress(vectjournal[i]), 2) ;2 line are identical ?? for i = 0, n_elements(vectjournal)-2 do $ if vectjournal[i] EQ vectjournal[i+1] then vectjournal[i] = ' ' for i = 0, n_elements(vectjournal)-1 do BEGIN & $ if strpos(vectjournal[i],'oups' ) NE -1 $ OR strpos(vectjournal[i],'Syntax error' ) NE -1 $ OR strpos(vectjournal[i],'Illegal character' ) NE -1 $ then BEGIN vectjournal[i] = ' ' & vectjournal[i-1] = ' ' & endif & $ if strpos(strtrim(vectjournal[i], 1),'retall' ) EQ 0 $ OR strpos(vectjournal[i],'@ps' ) NE -1 $ OR strpos(vectjournal[i],'@oups' ) NE -1 $ OR strpos(vectjournal[i],'@vzoom' ) NE -1 $ OR strpos(vectjournal[i],'help' ) NE -1 $ OR strpos(vectjournal[i],'print' ) NE -1 $ then vectjournal[i] = ' ' & $ if strpos(vectjournal[i],'text_box' ) NE -1 then $ IF strpos(vectjournal[i],',pos=' ) EQ -1 then $ vectjournal[i] = vectjournal[i]+strmid(vectjournal[i+1], 1) & endfor ; ; we rewrite idlsave.pro putfile, myuniquetmpdir+'idlsave.pro', vectjournal ; update the list of .pro and .sav in !PATH path_cache, /rebuild ; apply idlsave @idlsave ; the journal has just been reopened, and we put in elements of vectjournal. for i = 0, n_elements(vectjournal)-1 DO $ journal, vectjournal[i]