source: trunk/SRC/ToBeReviewed/UTILITAIRE/vzoom.pro @ 238

Last change on this file since 238 was 238, checked in by pinsard, 17 years ago

improvements/corrections of some *.pro headers

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.2 KB
RevLine 
[2]1;+
2;
[238]3; @file_comments
4; Make a real zoom in a plot, contrarly at the function
[133]5; ZOOM prewritten by IDL which just get pixels bigger.
[2]6;
[238]7; @categories
[150]8; utilities
[2]9;
[238]10; @restrictions
[150]11; use the journal.
[238]12;
[150]13; @history
[157]14; Sebastien Masson (smasson\@lodyc.jussieu.fr)
[133]15;          29/4/1999
[2]16;
[238]17; @version
18; $Id$
[2]19;
[150]20; @todo
21; seb
[2]22;
23;-
[232]24;
[2]25   cursor, x1, y1, /data, /dowm
26   cursor, x2, y2, /data, /down
27   x = [x1, x2]
28   x = x[sort(x)]
29   y = [y1, y2]
30   y = y[sort(y)]
[11]31   domdef, [x, y, vert1, vert2]
[133]32; we must close the journal!
[2]33   journal
[133]34; we recuperate the journal as a vector of string:
[11]35   vectjournal = getfile(myuniquetmpdir+'idlsave.pro')
[133]36; we cut the last line which is vraizoom
[2]37   vectjournal = vectjournal[0:n_elements(vectjournal)-2 ]
38;------------------------------------------------------------
[133]39; we correct it if there is the need to...
[2]40;------------------------------------------------------------
41for i = 0, n_elements(vectjournal)-1 do $
42 if strpos(vectjournal[i],'text_box' ) EQ -1 then $
43 vectjournal[i] = strtrim(strcompress(vectjournal[i]), 2)
[133]44;2 line are identical ??
[2]45for i = 0, n_elements(vectjournal)-2 do $
46 if vectjournal[i] EQ vectjournal[i+1] then vectjournal[i] = ' '
47
48for i = 0, n_elements(vectjournal)-1 do BEGIN & $
49 if strpos(vectjournal[i],'oups' ) NE -1 $
50 OR strpos(vectjournal[i],'Syntax error' ) NE -1 $
51 OR strpos(vectjournal[i],'Illegal character' ) NE -1 $
52 then BEGIN vectjournal[i] = ' ' & vectjournal[i-1] = ' ' & endif & $
53 if strpos(strtrim(vectjournal[i], 1),'retall' ) EQ 0 $
54 OR strpos(vectjournal[i],'@ps' ) NE -1 $
55 OR strpos(vectjournal[i],'@oups' ) NE -1 $
56 OR strpos(vectjournal[i],'@vzoom' ) NE -1 $
57 OR strpos(vectjournal[i],'help' ) NE -1 $
58 OR strpos(vectjournal[i],'print' ) NE -1 $
59 then  vectjournal[i] = ' ' & $
60 if strpos(vectjournal[i],'text_box' ) NE -1 then $
61 IF strpos(vectjournal[i],',pos=' ) EQ -1 then $
62 vectjournal[i] = vectjournal[i]+strmid(vectjournal[i+1], 1) & endfor
63
64
65;
[133]66; we rewrite idlsave.pro
[229]67  putfile, myuniquetmpdir+'idlsave.pro', vectjournal
68; update the list of .pro and .sav in !PATH
69   path_cache, /rebuild
[133]70; apply idlsave
[238]71@idlsave
72; the journal has just been reopened, and we put in elements of vectjournal.
[2]73for i = 0, n_elements(vectjournal)-1 DO $
[11]74journal, vectjournal[i]
Note: See TracBrowser for help on using the repository browser.