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

Last change on this file since 134 was 134, checked in by navarro, 18 years ago

change *.pro file properties (del eof-style, del executable, set keywords Id

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