source: trunk/ToBeReviewed/PLOTS/DIVERS/addaxe.pro @ 37

Last change on this file since 37 was 37, checked in by pinsard, 18 years ago

upgrade of PLOTS/DIVERS according to cerbere.lodyc.jussieu.fr: /usr/home/smasson/SAXO_RD/ : files

  • Property svn:eol-style set to native
  • Property svn:executable set to *
  • Property svn:keywords set to Author Date Id Revision
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@common
40;---------------------------------------
41   IF strpos(type, 'x') NE -1 THEN BEGIN
42      IF endpoints[1] EQ endpoints[3] THEN return
43      IF key_onearth THEN BEGIN
44        formeaxe0 = 'lonaxe'
45        formeaxe1 = 'lataxe'
46        titreaxe = 'latitude'
47      ENDIF ELSE BEGIN
48        formeaxe0 = ''
49        formeaxe1 = ''
50        titreaxe = 'j index'
51      ENDELSE
52      range = [endpoints[1], endpoints[3]]
53      if endpoints[2] LT endpoints[0] THEN range = reverse(range)
54   ENDIF ELSE BEGIN
55      IF endpoints[0] EQ endpoints[2] THEN return
56      IF key_onearth THEN BEGIN
57        formeaxe0 = 'lataxe'
58        formeaxe1 = 'lonaxe'
59        titreaxe = 'longitude'
60      ENDIF ELSE BEGIN
61        formeaxe0 = ''
62        formeaxe1 = ''
63        titreaxe = 'i index'
64      ENDELSE
65      range = [endpoints[0], endpoints[2]]
66      if endpoints[3] LT endpoints[1] THEN range = reverse(range)
67   ENDELSE
68   if type EQ 'yt' then BEGIN
69      axis,yaxis=0,ytickformat=formeaxe0,color=0,ystyle = 1, _EXTRA = ex
70      axis,yaxis=1,ytickformat=formeaxe1,color=0,ystyle = 1,ytitle=titreaxe, yrange = range, _EXTRA = ex
71   ENDIF ELSE BEGIN
72      axis,xaxis=0,xtickformat=formeaxe0,color=0,xstyle = 1,_EXTRA = ex
73      axis,xaxis=1,xtickformat=formeaxe1,color=0,xstyle = 1,xtitle=titreaxe, xrange = range, _EXTRA = ex
74   ENDELSE
75
76;---------------------------------------
77   return
78end
Note: See TracBrowser for help on using the repository browser.