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

Last change on this file was 495, checked in by pinsard, 10 years ago

fix thanks to coding rules; typo; dupe empty lines; trailing blanks

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