source: trunk/SRC/ToBeReviewed/PLOTS/DIVERS/addaxe.pro @ 163

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

header improvements : type of parameters and keywords, default values, spell checking + idldoc assistant (IDL online_help)

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 2.3 KB
Line 
1;------------------------------------------------------------
2;------------------------------------------------------------
3;------------------------------------------------------------
4;+
5;
6; @file_comments
7; Add an axis when we do an oblique section in pltz, pltt
8; or plt1d
9;
10; @categories
11; Graphics
12;
13; @param ENDPOINTS {in}{required}
14; Coordinate of extremities of the section
15;
16; @param TYPE {in}{required}{type=string}
17; A string of two characters specifying the type of plot we do
18;
19; @param POSFENETRE {in}{required}{type=vector}
20; The vector !p.position corresponding to the frame position of
21; the drawing part of the plot.
22;
23; @uses
24; common.pro
25;
26; @history
27; Sebastien Masson (smasson\@lodyc.jussieu.fr)
28;
29; @version
30; $Id$
31;
32;-
33;------------------------------------------------------------
34;------------------------------------------------------------
35;------------------------------------------------------------
36PRO addaxe, endpoints, type, posfenetre, _EXTRA = ex
37;
38  compile_opt idl2, strictarrsubs
39;
40@common
41;---------------------------------------
42   IF strpos(type, 'x') NE -1 THEN BEGIN
43      IF endpoints[1] EQ endpoints[3] THEN return
44      IF key_onearth THEN BEGIN
45        formeaxe0 = 'lonaxe'
46        formeaxe1 = 'lataxe'
47        titreaxe = 'latitude'
48      ENDIF ELSE BEGIN
49        formeaxe0 = ''
50        formeaxe1 = ''
51        titreaxe = 'j index'
52      ENDELSE
53      range = [endpoints[1], endpoints[3]]
54      if endpoints[2] LT endpoints[0] THEN range = reverse(range)
55   ENDIF ELSE BEGIN
56      IF endpoints[0] EQ endpoints[2] THEN return
57      IF key_onearth THEN BEGIN
58        formeaxe0 = 'lataxe'
59        formeaxe1 = 'lonaxe'
60        titreaxe = 'longitude'
61      ENDIF ELSE BEGIN
62        formeaxe0 = ''
63        formeaxe1 = ''
64        titreaxe = 'i index'
65      ENDELSE
66      range = [endpoints[0], endpoints[2]]
67      if endpoints[3] LT endpoints[1] THEN range = reverse(range)
68   ENDELSE
69   if type EQ 'yt' then BEGIN
70      axis,yaxis=0,ytickformat=formeaxe0,color=0,ystyle = 1, _EXTRA = ex
71      axis,yaxis=1,ytickformat=formeaxe1,color=0,ystyle = 1,ytitle=titreaxe, yrange = range, _EXTRA = ex
72   ENDIF ELSE BEGIN
73      axis,xaxis=0,xtickformat=formeaxe0,color=0,xstyle = 1,_EXTRA = ex
74      axis,xaxis=1,xtickformat=formeaxe1,color=0,xstyle = 1,xtitle=titreaxe, xrange = range, _EXTRA = ex
75   ENDELSE
76
77;---------------------------------------
78   return
79end
Note: See TracBrowser for help on using the repository browser.