[2] | 1 | ;+ |
---|
| 2 | ; |
---|
[142] | 3 | ; @file_comments |
---|
[495] | 4 | ; Add an axis when we do an oblique section in <pro>pltz</pro>, |
---|
[378] | 5 | ; <pro>pltt</pro> or <pro>plt1d</pro> |
---|
[2] | 6 | ; |
---|
[142] | 7 | ; @categories |
---|
[157] | 8 | ; Graphics |
---|
[2] | 9 | ; |
---|
[142] | 10 | ; @param ENDPOINTS {in}{required} |
---|
[163] | 11 | ; Coordinate of extremities of the section |
---|
[231] | 12 | ; |
---|
[163] | 13 | ; @param TYPE {in}{required}{type=string} |
---|
[142] | 14 | ; A string of two characters specifying the type of plot we do |
---|
[2] | 15 | ; |
---|
[163] | 16 | ; @param POSFENETRE {in}{required}{type=vector} |
---|
[231] | 17 | ; The vector !p.position corresponding to the frame position of |
---|
[142] | 18 | ; the drawing part of the plot. |
---|
[2] | 19 | ; |
---|
[142] | 20 | ; @uses |
---|
[370] | 21 | ; <pro>common</pro> |
---|
[2] | 22 | ; |
---|
[142] | 23 | ; @history |
---|
[157] | 24 | ; Sebastien Masson (smasson\@lodyc.jussieu.fr) |
---|
[2] | 25 | ; |
---|
[142] | 26 | ; @version |
---|
| 27 | ; $Id$ |
---|
[2] | 28 | ; |
---|
| 29 | ;- |
---|
[327] | 30 | PRO addaxe, endpoints, type, posfenetre, _EXTRA=ex |
---|
[114] | 31 | ; |
---|
| 32 | compile_opt idl2, strictarrsubs |
---|
| 33 | ; |
---|
[2] | 34 | @common |
---|
| 35 | ;--------------------------------------- |
---|
| 36 | IF strpos(type, 'x') NE -1 THEN BEGIN |
---|
| 37 | IF endpoints[1] EQ endpoints[3] THEN return |
---|
[231] | 38 | IF key_onearth THEN BEGIN |
---|
[37] | 39 | formeaxe0 = 'lonaxe' |
---|
| 40 | formeaxe1 = 'lataxe' |
---|
| 41 | titreaxe = 'latitude' |
---|
[231] | 42 | ENDIF ELSE BEGIN |
---|
[37] | 43 | formeaxe0 = '' |
---|
| 44 | formeaxe1 = '' |
---|
| 45 | titreaxe = 'j index' |
---|
| 46 | ENDELSE |
---|
[2] | 47 | range = [endpoints[1], endpoints[3]] |
---|
[37] | 48 | if endpoints[2] LT endpoints[0] THEN range = reverse(range) |
---|
[2] | 49 | ENDIF ELSE BEGIN |
---|
| 50 | IF endpoints[0] EQ endpoints[2] THEN return |
---|
[231] | 51 | IF key_onearth THEN BEGIN |
---|
[37] | 52 | formeaxe0 = 'lataxe' |
---|
| 53 | formeaxe1 = 'lonaxe' |
---|
| 54 | titreaxe = 'longitude' |
---|
[231] | 55 | ENDIF ELSE BEGIN |
---|
[37] | 56 | formeaxe0 = '' |
---|
| 57 | formeaxe1 = '' |
---|
| 58 | titreaxe = 'i index' |
---|
| 59 | ENDELSE |
---|
[2] | 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 |
---|
| 73 | end |
---|