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

Last change on this file since 229 was 229, checked in by smasson, 17 years ago

bugfix in path usage (continuation)

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