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
Line 
1;+
2;
3; @file_comments
4; Make a real zoom in a plot, contrarly at the function
5; ZOOM prewritten by IDL which just get pixels bigger.
6;
7; @categories
8; utilities
9;
10; @restrictions
11; use the journal.
12;
13; @history
14; Sebastien Masson (smasson\@lodyc.jussieu.fr)
15;          29/4/1999
16;
17; @version
18; $Id$
19;
20; @todo
21; seb
22;
23;-
24;
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)]
31   domdef, [x, y, vert1, vert2]
32; we must close the journal!
33   journal
34; we recuperate the journal as a vector of string:
35   vectjournal = getfile(myuniquetmpdir+'idlsave.pro')
36; we cut the last line which is vraizoom
37   vectjournal = vectjournal[0:n_elements(vectjournal)-2 ]
38;------------------------------------------------------------
39; we correct it if there is the need to...
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)
44;2 line are identical ??
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;
66; we rewrite idlsave.pro
67  putfile, myuniquetmpdir+'idlsave.pro', vectjournal
68; update the list of .pro and .sav in !PATH
69   path_cache, /rebuild
70; apply idlsave
71@idlsave
72; the journal has just been reopened, and we put in elements of vectjournal.
73for i = 0, n_elements(vectjournal)-1 DO $
74journal, vectjournal[i]
Note: See TracBrowser for help on using the repository browser.