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