source: trunk/SRC/ToBeReviewed/PLOTS/DIVERS/addaxe.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.4 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5; NAME:addaxe
6;
7; PURPOSE:ajoute un axe qd on fait une section oblique ds pltz, pltt
8; ou plt1d
9;
10; CATEGORY:autour de pltz, pltt et plt1d
11;
12; CALLING SEQUENCE:addaxe, type, posfenetre
13;
14; INPUTS:endpoints:coordonnees des extremites de ;a section
15;        type: un string de 2 characteres specifiant qule type de plot
16; on fait.
17;        posfenetre: ler vecteur !p.posotion correspondant a ;a
18;        position du cadre de la partie dessin du plot.
19;
20; KEYWORD PARAMETERS:
21;
22; OUTPUTS:
23;
24; COMMON BLOCKS:common.pro
25;
26; SIDE EFFECTS:
27;
28; RESTRICTIONS:
29;
30; EXAMPLE:
31;
32; MODIFICATION HISTORY:Sebastien Masson (smasson@lodyc.jussieu.fr)
33;
34;-
35;------------------------------------------------------------
36;------------------------------------------------------------
37;------------------------------------------------------------
38PRO addaxe, endpoints, type, posfenetre, _EXTRA = ex
39;
40  compile_opt idl2, strictarrsubs
41;
42@common
43;---------------------------------------
44   IF strpos(type, 'x') NE -1 THEN BEGIN
45      IF endpoints[1] EQ endpoints[3] THEN return
46      IF key_onearth THEN BEGIN
47        formeaxe0 = 'lonaxe'
48        formeaxe1 = 'lataxe'
49        titreaxe = 'latitude'
50      ENDIF ELSE BEGIN
51        formeaxe0 = ''
52        formeaxe1 = ''
53        titreaxe = 'j index'
54      ENDELSE
55      range = [endpoints[1], endpoints[3]]
56      if endpoints[2] LT endpoints[0] THEN range = reverse(range)
57   ENDIF ELSE BEGIN
58      IF endpoints[0] EQ endpoints[2] THEN return
59      IF key_onearth THEN BEGIN
60        formeaxe0 = 'lataxe'
61        formeaxe1 = 'lonaxe'
62        titreaxe = 'longitude'
63      ENDIF ELSE BEGIN
64        formeaxe0 = ''
65        formeaxe1 = ''
66        titreaxe = 'i index'
67      ENDELSE
68      range = [endpoints[0], endpoints[2]]
69      if endpoints[3] LT endpoints[1] THEN range = reverse(range)
70   ENDELSE
71   if type EQ 'yt' then BEGIN
72      axis,yaxis=0,ytickformat=formeaxe0,color=0,ystyle = 1, _EXTRA = ex
73      axis,yaxis=1,ytickformat=formeaxe1,color=0,ystyle = 1,ytitle=titreaxe, yrange = range, _EXTRA = ex
74   ENDIF ELSE BEGIN
75      axis,xaxis=0,xtickformat=formeaxe0,color=0,xstyle = 1,_EXTRA = ex
76      axis,xaxis=1,xtickformat=formeaxe1,color=0,xstyle = 1,xtitle=titreaxe, xrange = range, _EXTRA = ex
77   ENDELSE
78
79;---------------------------------------
80   return
81end
Note: See TracBrowser for help on using the repository browser.